Skip to content

Commit ec6a1ab

Browse files
committed
Ignore F401 in __init__.py
Because the nicest modular Pythonic design is to import all your public API from supporting files into __init__.py, so they are available from the toplevel, and we don't want flake8 yelling at us about it. Thanks to @gselzer and https://stackoverflow.com/a/58029222/1207769.
1 parent 1b47291 commit ec6a1ab

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ extend-ignore = ["E203"]
7777
# See https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
7878
max-line-length = 88
7979
min_python_version = "3.8"
80+
per-file-ignores = "__init__.py:F401"
8081

8182
[tool.isort]
8283
profile = "black"

src/scyjava/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
from functools import lru_cache
7171
from typing import Any, Callable, Dict
7272

73-
from ._arrays import is_arraylike, is_memoryarraylike, is_xarraylike # noqa: F401
74-
from ._convert import ( # noqa: F401
73+
from ._arrays import is_arraylike, is_memoryarraylike, is_xarraylike
74+
from ._convert import (
7575
Converter,
7676
JavaCollection,
7777
JavaIterable,
@@ -106,8 +106,8 @@
106106
when_jvm_starts,
107107
when_jvm_stops,
108108
)
109-
from ._script import enable_python_scripting # noqa: F401
110-
from ._types import ( # noqa: F401
109+
from ._script import enable_python_scripting
110+
from ._types import (
111111
JavaClasses,
112112
is_jarray,
113113
isjava,
@@ -117,7 +117,7 @@
117117
jstacktrace,
118118
numeric_bounds,
119119
)
120-
from ._versions import compare_version, get_version, is_version_at_least # noqa: F401
120+
from ._versions import compare_version, get_version, is_version_at_least
121121

122122
__version__ = get_version("scyjava")
123123
__all__ = [

0 commit comments

Comments
 (0)