Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge typeshed return annotations #4744

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion setuptools/command/bdist_egg.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def run(self) -> None: # noqa: C901 # is too complex (14) # FIXME
self.egg_output,
archive_root,
verbose=self.verbose,
dry_run=self.dry_run,
dry_run=self.dry_run, # type: ignore[arg-type] # Is an actual boolean in vendored _distutils
mode=self.gen_header(),
)
if not self.keep_temp:
Expand Down
2 changes: 1 addition & 1 deletion setuptools/command/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def get_tag(self) -> tuple[str, str, str]:
)
return tag

def run(self) -> None:
def run(self):
Copy link
Contributor Author

@Avasam Avasam Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted out of annotating this specific run in this PR for the same reason I didn't do initialize_options.

(note that I'm commenting on a specific commit, this PR doesn't remove any return annotation)

build_scripts = self.reinitialize_command("build_scripts")
build_scripts.executable = "python"
build_scripts.force = True
Expand Down
5 changes: 4 additions & 1 deletion setuptools/command/easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,10 @@ def select_scheme(self, name) -> None:
install._select_scheme(self, name)
except AttributeError:
# stdlib distutils
install.install.select_scheme(self, name.replace('posix', 'unix'))
install.install.select_scheme(
self, # type: ignore[arg-type] # Pretend it's the correct type for stdlib compatibility
name.replace('posix', 'unix'),
)

# FIXME: 'easy_install.process_distribution' is too complex (12)
def process_distribution( # noqa: C901
Expand Down
Loading