Skip to content

Commit

Permalink
Impose upper limit to pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Apr 17, 2024
1 parent 1493940 commit b515b29
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pytest = "^7.0.0"
pytest-mock = "^3.7.0"
poethepoet = "^0.25.1"
pre-commit = "^3.0.0"
# need custom fork of mkinit to handle .pyi files. PR to main repo pending
# a mkinit dep has the 'platform_system == "Windows"' as a marker on an incompatible dependeny
# (pydantic<2.0 cf copier), so set the inverse as a marker here so mkinit can
# still be resolved
Expand All @@ -90,7 +89,9 @@ pytest-benchmark = "^4.0.0"
pyfakefs = "^5.1.0"
pyparsing = "^3.0.9"
pathvalidate = "^3.0.0"
pyright = "^1.1.339"
# Bug in .358 preventing the types from the converter arguments of attrs classes to
# propogate properly
pyright = "^1.1.339,<1.1.358"
ruff = "^0.1.7"
pytest-xdist = "^3.3.1"
pytest-split = "^0.8.1"
Expand Down
2 changes: 1 addition & 1 deletion snakebids/io/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def path2str(dumper: Dumper, data: Path):
return dumper.represent_scalar(
"tag:yaml.org,2002:str",
str(data),
) # type: ignore
)

def to_dict(dumper: Dumper, data: OrderedDict[Any, Any]):
return dumper.represent_dict(dict(data))
Expand Down
4 changes: 2 additions & 2 deletions snakebids/utils/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __repr__(self) -> str:
return f"{self.__class__.__name__}({list(self._data)})"

@override
def __contains__(self, item: object, /) -> bool:
return item in self._data
def __contains__(self, value: object) -> bool:
return value in self._data

@override
def __hash__(self):
Expand Down

0 comments on commit b515b29

Please sign in to comment.