Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of booleanLiterals in cql2-text #96

Merged

Conversation

duckontheweb
Copy link
Contributor

@duckontheweb duckontheweb commented May 24, 2024

Uses Lark's terminal priority to ensure that booleanLiteral values (case-insensitive TRUE/FALSE) are parsed as such and not as attributes (which is currently the case).

I attempted to run the pre-commit formatters/linters but I could not install isort using the version of poetry currently installed on my system and bumping the isort version in .pre-commit-config.yaml introduced some changes to the sorting rules that affected multiple files. I am happy to include updates to the pre-commit dependencies as a sidecar change to this PR or to open a separate PR with those changes.

BEGIN_COMMIT_OVERRIDE
fix: Addresses #95.
END_COMMIT_OVERRIDE

@duckontheweb
Copy link
Contributor Author

I am happy to include updates to the pre-commit dependencies as a sidecar change to this PR or to open a separate PR with those changes.

I ended up opening #97 to bump the pre-commit dependencies.

@constantinius constantinius merged commit d51dbb0 into geopython:main Jul 8, 2024
antoine-de added a commit to antoine-de/pygeofilter that referenced this pull request Aug 29, 2024
For the moment

```python
    assert parse("attr = true") == ast.Equal(
        ast.Attribute("attr"),
        ast.Attribute("true"),
    )
```
like geopython#96, use lark terminal
priority to ensure boolean are parsed as such and not as attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants