Skip to content

Commit c8959bd

Browse files
committed
Merge branch 'setuptools-simple-typeshed-params' of https://github.com/Avasam/setuptools into setuptools-simple-typeshed-params
2 parents 33106f1 + bd694d3 commit c8959bd

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

mypy.ini

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,20 @@ disable_error_code = import-not-found
5353
# - support for `SETUPTOOLS_USE_DISTUTILS=stdlib` is dropped (#3625)
5454
# for setuptools to import `_distutils` directly
5555
# - or non-stdlib distutils typings are exposed
56+
[mypy-distutils.*]
57+
ignore_missing_imports = True
58+
59+
# - wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
60+
[mypy-wheel.*]
61+
ignore_missing_imports = True
5662
# - The following are not marked as py.typed:
5763
# - jaraco: Since mypy 1.12, the root name of the untyped namespace package gets called-out too
5864
# - jaraco.develop: https://github.com/jaraco/jaraco.develop/issues/22
5965
# - jaraco.envs: https://github.com/jaraco/jaraco.envs/issues/7
6066
# - jaraco.packaging: https://github.com/jaraco/jaraco.packaging/issues/20
6167
# - jaraco.path: https://github.com/jaraco/jaraco.path/issues/2
62-
# - jaraco.test: https://github.com/jaraco/jaraco.test/issues/7
6368
# - jaraco.text: https://github.com/jaraco/jaraco.text/issues/17
64-
# - wheel: does not intend on exposing a programmatic API https://github.com/pypa/wheel/pull/610#issuecomment-2081687671
65-
[mypy-distutils.*,jaraco,jaraco.develop,jaraco.envs,jaraco.packaging.*,jaraco.path,jaraco.test.*,jaraco.text,wheel.*]
69+
[mypy-jaraco,jaraco.develop,jaraco.envs,jaraco.packaging.*,jaraco.path,jaraco.text]
6670
ignore_missing_imports = True
6771

6872
# Even when excluding a module, import issues can show up due to following import

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test = [
5959
# workaround for pypa/pyproject-hooks#206
6060
"pyproject-hooks!=1.1",
6161

62-
"jaraco.test",
62+
"jaraco.test>=5.5", # py.typed
6363
]
6464

6565
doc = [

ruff.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,22 @@ exclude = [
77
[lint]
88
extend-select = [
99
"C901",
10-
"PERF401",
1110
"W",
1211

1312
# local
1413
"ANN2", # missing-return-type-*
14+
"F", # Pyflakes
1515
"F404", # late-future-import
1616
"FA", # flake8-future-annotations
1717
"I", # isort
18+
"PERF", # Perflint
1819
"PYI", # flake8-pyi
1920
"TRY", # tryceratops
2021
"UP", # pyupgrade
2122
"YTT", # flake8-2020
2223
]
2324
ignore = [
25+
"PERF203", # try-except-in-loop, micro-optimisation with many false-positive. Worth checking but don't block CI
2426
"TRY003", # raise-vanilla-args, avoid multitude of exception classes
2527
"TRY301", # raise-within-try, it's handy
2628
"UP015", # redundant-open-modes, explicit is preferred

setuptools/command/easy_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ def get_args(cls, dist, header=None):
21872187
spec = str(dist.as_requirement())
21882188
for type_ in 'console', 'gui':
21892189
group = type_ + '_scripts'
2190-
for name, ep in dist.get_entry_map(group).items():
2190+
for name in dist.get_entry_map(group).keys():
21912191
cls._ensure_safe_name(name)
21922192
script_text = cls.template % locals()
21932193
args = cls._get_script_args(type_, name, header, script_text)

setuptools/tests/test_manifest.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -485,14 +485,8 @@ def test_process_template_line_invalid(self):
485485
'prune',
486486
'blarg',
487487
):
488-
try:
488+
with pytest.raises(DistutilsTemplateError):
489489
file_list.process_template_line(action)
490-
except DistutilsTemplateError:
491-
pass
492-
except Exception:
493-
assert False, "Incorrect error thrown"
494-
else:
495-
assert False, "Should have thrown an error"
496490

497491
def test_include(self, caplog):
498492
caplog.set_level(logging.DEBUG)

0 commit comments

Comments
 (0)