Skip to content

Commit

Permalink
Upgrade Lark to v1 (#1242)
Browse files Browse the repository at this point in the history
* Bump lark from 0.12.0 to 1.1.2

Bumps [lark](https://github.com/lark-parser/lark) from 0.12.0 to 1.1.2.
- [Release notes](https://github.com/lark-parser/lark/releases)
- [Changelog](https://github.com/lark-parser/lark/blob/master/CHANGELOG.md)
- [Commits](lark-parser/lark@0.12.0...1.1.2)

---
updated-dependencies:
- dependency-name: lark
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix `BaseTransformer` MRO and `maybe_placeholder` and bump lark

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
ml-evs and dependabot[bot] committed Jun 9, 2022
1 parent c57a0ac commit a5691f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion optimade/filterparser/lark_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self, version: Tuple[int, int, int] = None, variant: str = "default
self.variant = variant

with open(AVAILABLE_PARSERS[version][variant]) as f:
self.lark = Lark(f)
self.lark = Lark(f, maybe_placeholders=False)

self.tree = None
self.filter = None
Expand Down
2 changes: 1 addition & 1 deletion optimade/filtertransformers/base_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(
self.length_quantity = length_quantity


class BaseTransformer(abc.ABC, Transformer):
class BaseTransformer(Transformer, abc.ABC):
"""Generic filter transformer that handles various
parts of the grammar in a backend non-specific way.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
elasticsearch-dsl==7.4.0
email_validator==1.2.1
fastapi==0.78.0
lark==0.12.0
lark==1.1.2
mongomock==4.0.0
pydantic==1.9.1
pymongo==4.1.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
],
python_requires=">=3.7,<3.11",
install_requires=[
"lark~=0.12",
"lark~=1.1",
"fastapi~=0.65",
"pydantic~=1.9",
"email_validator~=1.2",
Expand Down

0 comments on commit a5691f7

Please sign in to comment.