Skip to content

Commit 4b648f3

Browse files
committed
Completely disable ignore-fully-untyped
1 parent 6660f54 commit 4b648f3

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

pkg_resources/tests/test_pkg_resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
class EggRemover(str):
25-
def __call__(self):
25+
def __call__(self) -> None:
2626
if self in sys.path:
2727
sys.path.remove(self)
2828
if os.path.exists(self):

pkg_resources/tests/test_working_set.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
from __future__ import annotations
2+
13
import functools
24
import inspect
35
import re
46
import textwrap
7+
from collections.abc import Iterable
58

69
import pytest
710

@@ -56,10 +59,10 @@ def parse_distributions(s):
5659

5760

5861
class FakeInstaller:
59-
def __init__(self, installable_dists) -> None:
62+
def __init__(self, installable_dists: Iterable[pkg_resources.Distribution]) -> None:
6063
self._installable_dists = installable_dists
6164

62-
def __call__(self, req):
65+
def __call__(self, req) -> pkg_resources.Distribution | None:
6366
return next(
6467
iter(filter(lambda dist: dist in req, self._installable_dists)), None
6568
)

ruff.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ section-order = ["future", "standard-library", "eager", "third-party", "first-pa
8282
sections.eager = ["_distutils_hack"]
8383
sections.delayed = ["distutils"]
8484

85-
[lint.flake8-annotations]
86-
ignore-fully-untyped = true
87-
8885
[format]
8986
# Enable preview to get hugged parenthesis unwrapping and other nice surprises
9087
# See https://github.com/jaraco/skeleton/pull/133#issuecomment-2239538373

setuptools/tests/integration/helpers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
facilitate debugging.
66
"""
77

8+
from __future__ import annotations
9+
810
import os
911
import subprocess
1012
import tarfile
13+
from collections.abc import Iterator
1114
from pathlib import Path
12-
from zipfile import ZipFile
15+
from zipfile import ZipFile, ZipInfo
1316

1417

1518
def run(cmd, env=None):
@@ -44,7 +47,7 @@ def __init__(self, filename) -> None:
4447
else:
4548
raise ValueError(f"{filename} doesn't seem to be a zip or tar.gz")
4649

47-
def __iter__(self):
50+
def __iter__(self) -> Iterator[ZipInfo] | Iterator[tarfile.TarInfo]:
4851
if hasattr(self._obj, "infolist"):
4952
return iter(self._obj.infolist())
5053
return iter(self._obj)

setuptools/tests/test_build_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(self, *args, **kwargs) -> None:
8282

8383
(self.backend_name, _, self.backend_obj) = self.backend_name.partition(':')
8484

85-
def __call__(self, name, *args, **kw):
85+
def __call__(self, name, *args, **kw) -> Any:
8686
"""Handles arbitrary function invocations on the build backend."""
8787
os.chdir(self.cwd)
8888
os.environ.update(self.env)

0 commit comments

Comments
 (0)