Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
python-version: "3.10"
# flake8 not in requirements-dev.txt, because versions specified in setup.py are complicated
- run: pip install -e .
- run: pip install -r requirements-dev.txt
- run: |
flake8 $(git ls-files | grep 'py$')
tests:
Expand Down
4 changes: 2 additions & 2 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ def active(self) -> bool:


class PyiVisitor(ast.NodeVisitor):
def __init__(self, filename: Path = Path("none")) -> None:
self.filename = filename
def __init__(self, filename: Path | None = None) -> None:
self.filename = Path("(none)") if filename is None else filename
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the pathname from none to (none). Is this intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes — it was (none) before I (accidentally) changed it in #144; this changes it back, and makes it consistent with PyiTreeChecker.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Good catch, though — thanks for checking!)

self.errors: list[Error] = []
# Mapping of all private TypeVars/ParamSpecs/TypeVarTuples to the nodes where they're defined
self.typevarlike_defs: dict[TypeVarInfo, ast.Assign] = {}
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ black==22.1.0
pytest==6.2.5
mypy==0.931
isort==5.10.1
flake8-bugbear==22.1.11