Skip to content

Commit

Permalink
refactor: ignore import lint errors in __init__ files (#273)
Browse files Browse the repository at this point in the history
- make sure ruff doesn't delete import statements from init
- specifically ignore F401 in init because that's a design decision in ipyvuetify
  • Loading branch information
12rambau authored Aug 25, 2023
1 parent 32273a0 commit 884ecb2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ipyvuetify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from ._version import __version__ # noqa: F401
from .generated import * # noqa: F401, F403
from .Html import Html # noqa: F401
from .Themes import theme # noqa: F401
from .VuetifyTemplate import VuetifyTemplate # noqa: F401
from ._version import __version__
from .generated import * # noqa: F403
from .Html import Html
from .Themes import theme
from .VuetifyTemplate import VuetifyTemplate


def _jupyter_labextension_paths():
Expand Down
2 changes: 1 addition & 1 deletion ipyvuetify/extra/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .file_input import FileInput # noqa: F401
from .file_input import FileInput
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ exclude = ["docs*", "tests*"]
universal = true

[tool.ruff]
ignore-init-module-imports = true
fix = true
exclude = [
'.git',
Expand All @@ -70,3 +71,6 @@ ignore = [
]
line-length = 100
select = ["E", "W", "F", "Q", "I"]

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]

0 comments on commit 884ecb2

Please sign in to comment.