Skip to content

Commit 49e85cf

Browse files
authored
Run flake8-bugbear in CI (#172)
Revert accidental "none" path name change.
1 parent 231dc19 commit 49e85cf

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
python-version: "3.10"
3333
# flake8 not in requirements-dev.txt, because versions specified in setup.py are complicated
3434
- run: pip install -e .
35+
- run: pip install -r requirements-dev.txt
3536
- run: |
3637
flake8 $(git ls-files | grep 'py$')
3738
tests:

pyi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ def active(self) -> bool:
362362

363363

364364
class PyiVisitor(ast.NodeVisitor):
365-
def __init__(self, filename: Path = Path("none")) -> None:
366-
self.filename = filename
365+
def __init__(self, filename: Path | None = None) -> None:
366+
self.filename = Path("(none)") if filename is None else filename
367367
self.errors: list[Error] = []
368368
# Mapping of all private TypeVars/ParamSpecs/TypeVarTuples to the nodes where they're defined
369369
self.typevarlike_defs: dict[TypeVarInfo, ast.Assign] = {}

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ black==22.1.0
22
pytest==6.2.5
33
mypy==0.931
44
isort==5.10.1
5+
flake8-bugbear==22.1.11

0 commit comments

Comments
 (0)