Skip to content

Commit 5b9d787

Browse files
committed
Remove Unused "type: ignore" comments
1 parent d8e087f commit 5b9d787

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

setuptools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def reinitialize_command(
221221
) -> _Command:
222222
cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
223223
vars(cmd).update(kw)
224-
return cmd # pyright: ignore[reportReturnType] # pypa/distutils#307
224+
return cmd
225225

226226
@abstractmethod
227227
def initialize_options(self) -> None:

setuptools/command/install.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,4 @@ def do_egg_install(self) -> None:
180180
# XXX Python 3.1 doesn't see _nc if this is inside the class
181181
install.sub_commands = [
182182
cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc
183-
] + install.new_commands # type: ignore[operator]
184-
# TODO: Type sub_commands/new_commands to avoid variance issues in pypa/distutils (like python/typeshed#11951)
183+
] + install.new_commands

setuptools/command/sdist.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@ class sdist(orig.sdist):
5050
]
5151

5252
distribution: Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
53-
# TODO: Mark class-level mutables as ClassVars in pypa/distutils (like python/typeshed#12403)
54-
negative_opt: ClassVar[dict[str, str]] = {} # type: ignore[misc]
53+
negative_opt: ClassVar[dict[str, str]] = {}
5554

5655
README_EXTENSIONS = ['', '.rst', '.txt', '.md']
57-
# TODO: Mark some class-level tuples as as not fixed-length pypa/distutils (like python/typeshed#12403)
58-
READMES = tuple('README{0}'.format(ext) for ext in README_EXTENSIONS) # type: ignore[assignment]
56+
READMES = tuple('README{0}'.format(ext) for ext in README_EXTENSIONS)
5957

6058
def run(self) -> None:
6159
self.run_command('egg_info')

setuptools/tests/test_build_ext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
import sys
35
from importlib.util import cache_from_source as _compiled_file_name

0 commit comments

Comments
 (0)