Skip to content

Commit

Permalink
ci: use flake8-bugbear for linting (python-poetry#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades authored Nov 15, 2021
1 parent abc5640 commit cdbc678
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ repos:
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
exclude: |
(?x)(
^poetry/core/utils/_typing.py$
Expand Down
2 changes: 1 addition & 1 deletion poetry/core/masonry/builders/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def find_nearest_pkg(rel_path: str) -> Tuple[str, str]:
# Relative to the top-level package
return pkg_name, Path(rel_path).as_posix()

for path, dirnames, filenames in os.walk(str(base), topdown=True):
for path, _dirnames, filenames in os.walk(str(base), topdown=True):
if os.path.basename(path) == "__pycache__":
continue

Expand Down
2 changes: 1 addition & 1 deletion poetry/core/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def safe_rmtree(path: Union[str, Path]) -> None:


def merge_dicts(d1: dict, d2: dict) -> None:
for k, v in d2.items():
for k in d2.keys():
if k in d1 and isinstance(d1[k], dict) and isinstance(d2[k], Mapping):
merge_dicts(d1[k], d2[k])
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def pytest_configure(config):
config.addinivalue_line("markers", "integration: mark integration tests")

if not config.option.integration:
setattr(config.option, "markexpr", "not integration")
config.option.markexpr = "not integration"


def get_project_from_dir(base_directory): # type: (Path) -> Callable[[str], Path]
Expand Down

0 comments on commit cdbc678

Please sign in to comment.