* Introduce Y067: Don't use Incomplete | None = None.
* Introduce Y091: Protocol method parameters should not be
positional-or-keyword.
* Y011/Y015 will now allow all defaults that include an attribute
access, for example math.inf or enum members.
* Development-only dependencies are now declared using dependency
groups rather than optional dependencies.
* The plugin now exists as a flake8_pyi package rather than a
single pyi.py file.
* Declare support for Python 3.14
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=35
24 lines
964 B
Diff
24 lines
964 B
Diff
Index: flake8_pyi-25.5.0/tests/test_pyi_files.py
|
|
===================================================================
|
|
--- flake8_pyi-25.5.0.orig/tests/test_pyi_files.py
|
|
+++ flake8_pyi-25.5.0/tests/test_pyi_files.py
|
|
@@ -43,6 +43,9 @@ def test_pyi_file(path: str) -> None:
|
|
option = flag.split("=")[0]
|
|
assert option not in {"--ignore", "--select"}, bad_flag_msg(option[2:])
|
|
|
|
+ pythonpath = os.environ.get("PYTHONPATH")
|
|
+ pythonpath = f"PYTHONPATH={pythonpath}:."
|
|
+
|
|
# Silence DeprecationWarnings from our dependencies (pyflakes, flake8-bugbear, etc.)
|
|
#
|
|
# For DeprecationWarnings coming from flake8-pyi itself,
|
|
@@ -51,6 +54,8 @@ def test_pyi_file(path: str) -> None:
|
|
# but the test failure report that pytest gives is much easier to read
|
|
# if we use `-Wdefault:::flake8_pyi`
|
|
flake8_invocation = [
|
|
+ "env",
|
|
+ pythonpath,
|
|
sys.executable,
|
|
"-Wignore",
|
|
"-Wdefault:::flake8_pyi",
|