Skip to content

Commit

Permalink
Add flake8-no-pep420 plugin for ruff (#2315)
Browse files Browse the repository at this point in the history
This PR adds flake8-no-pep420 plugin for ruff and fixes the following
warnings:

* INP001 File `galaxy_ng/app/api/ui/v2/filters.py` is part of an implicit namespace package. Add an `__init__.py`.

Implicit namespace packages defined in PEP420 are easily misused and
are a hidden source of import bugs later on.
  • Loading branch information
cutwater authored Oct 17, 2024
1 parent b5b0c69 commit ccce076
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ extend-select = [
"B",
# flake8-comprehensions
"C4",
# flake8-no-pep420
"INP",
]
extend-ignore = [
# B904 requires using `raise ... from ...` to explicitly tell what to do with "parent"
# exception. Would be nice to fix, but ignoring for now.
"B904",
]

[tool.ruff.lint.per-file-ignores]
"!galaxy_ng/**" = ["INP"]

0 comments on commit ccce076

Please sign in to comment.