Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ts_utils/mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MypyDistConf(NamedTuple):
# The configuration section in the metadata file looks like the following, with multiple module sections possible
# [mypy-tests]
# [mypy-tests.yaml]
# module_name = "yaml"
# module-name = "yaml"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@lev-blit Can't blame you for missing this one in #15614 :P

# [mypy-tests.yaml.values]
# disallow_incomplete_defs = true
# disallow_untyped_defs = true
Expand All @@ -39,9 +39,9 @@ def mypy_configuration_from_distribution(distribution: str) -> list[MypyDistConf

def validate_configuration(section_name: str, mypy_section: dict[str, Any]) -> MypyDistConf:
assert isinstance(mypy_section, dict), f"{section_name} should be a section"
module_name = mypy_section.get("module_name")
module_name = mypy_section.get("module-name")

assert module_name is not None, f"{section_name} should have a module_name key"
assert module_name is not None, f"{section_name} should have a module-name key"
assert isinstance(module_name, str), f"{section_name} should be a key-value pair"

assert "values" in mypy_section, f"{section_name} should have a values section"
Expand Down
4 changes: 1 addition & 3 deletions stubs/setuptools/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ setuptools._distutils.command.install.INSTALL_SCHEMES
setuptools._distutils.command.install.SCHEME_KEYS
setuptools._distutils.command.install.WINDOWS_SCHEME
setuptools._distutils.command.install_lib.PYTHON_SOURCE_EXTENSION
setuptools._distutils.dir_util.SkipRepeatAbsolutePaths.instance
setuptools._distutils.dist.fix_help_options
setuptools._distutils.extension.read_setup_file
setuptools._distutils.filelist.findall
Expand All @@ -52,7 +53,6 @@ setuptools._distutils.sysconfig.parse_config_h
setuptools._distutils.sysconfig.parse_makefile
setuptools._distutils.sysconfig.project_base
setuptools._distutils.sysconfig.python_build
setuptools._distutils.util.is_freethreaded
setuptools._distutils.util.MACOSX_VERSION_VAR

# Missing submodules from setuptools._distutils
Expand All @@ -70,9 +70,7 @@ setuptools._distutils.compat.numpy
setuptools._distutils.compat.py39
setuptools._distutils.core
setuptools._distutils.debug
setuptools._distutils.dir_util
setuptools._distutils.fancy_getopt
setuptools._distutils.file_util
setuptools._distutils.log
setuptools._distutils.text_file
setuptools._distutils.version.Version._cmp # abstract method
Expand Down
9 changes: 7 additions & 2 deletions stubs/setuptools/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "82.0.*"
version = "83.0.*"
upstream-repository = "https://github.com/pypa/setuptools"
extra-description = """\
Given that `pkg_resources` is typed since `setuptools >= 71.1`, \
Expand All @@ -8,4 +8,9 @@ it is no longer included with `types-setuptools`.
[tool.stubtest]
# darwin is equivalent to linux for OS-specific methods
ci-platforms = ["linux", "win32"]
stubtest-dependencies = ["tomli"]
stubtest-dependencies = ["more_itertools", "tomli"]

# Stubtest fails on trying to run mypy on the source files rather than our stubs
[mypy-tests.distutils]
module-name = "setuptools._distutils.compilers.C.*"
values = { ignore_errors = true }
8 changes: 4 additions & 4 deletions stubs/setuptools/setuptools/_distutils/command/build.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class build(Command):
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...
def has_pure_modules(self): ...
def has_c_libraries(self): ...
def has_ext_modules(self): ...
def has_scripts(self): ...
def has_pure_modules(self) -> bool: ...
def has_c_libraries(self) -> bool: ...
def has_ext_modules(self) -> bool: ...
def has_scripts(self) -> bool: ...
18 changes: 9 additions & 9 deletions stubs/setuptools/setuptools/_distutils/command/install.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class install(Command):
install_base: Incomplete
install_platbase: Incomplete
root: str | None
install_purelib: Incomplete
install_platlib: Incomplete
install_headers: Incomplete
install_purelib: str | None
install_platlib: str | None
install_headers: str | None
install_lib: str | None
install_scripts: Incomplete
install_data: Incomplete
install_scripts: str | None
install_data: str | None
install_userbase: Incomplete
install_usersite: Incomplete
compile: Incomplete
Expand Down Expand Up @@ -54,7 +54,7 @@ class install(Command):
def create_path_file(self) -> None: ...
def get_outputs(self): ...
def get_inputs(self): ...
def has_lib(self): ...
def has_headers(self): ...
def has_scripts(self): ...
def has_data(self): ...
def has_lib(self) -> bool: ...
def has_headers(self) -> bool: ...
def has_scripts(self) -> bool: ...
def has_data(self) -> bool: ...
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Compiler:

def library_dir_option(self, dir: str) -> str: ...
def library_option(self, lib: str) -> str: ...
def runtime_library_dir_option(self, dir: str) -> str: ...
def runtime_library_dir_option(self, dir: str) -> str | list[str]: ...
def set_executables(self, **kwargs: str) -> None: ...
def set_executable(self, key: str, value) -> None: ...
def compile(
Expand Down
11 changes: 6 additions & 5 deletions stubs/setuptools/setuptools/_distutils/dist.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from re import Pattern
from typing import IO, ClassVar, Literal, TypeAlias, TypeVar, overload

from .cmd import Command
from .extension import Extension

command_re: Pattern[str]

Expand Down Expand Up @@ -78,18 +79,18 @@ class Distribution:
script_args: list[str] | None
command_options: dict[str, dict[str, tuple[str, str]]]
dist_files: list[tuple[str, str, str]]
packages: Incomplete
packages: list[str] | None
package_data: dict[str, list[str]]
package_dir: Incomplete
py_modules: Incomplete
package_dir: dict[str, str] | None
py_modules: list[str] | None
libraries: Incomplete
headers: Incomplete
ext_modules: Incomplete
ext_modules: list[Extension] | None
ext_package: Incomplete
include_dirs: Incomplete
extra_path: Incomplete
scripts: Incomplete
data_files: Incomplete
data_files: list[str | tuple[Incomplete, ...]] | None
password: str
command_obj: dict[str, Command]
have_run: dict[str, bool]
Expand Down
1 change: 1 addition & 0 deletions stubs/setuptools/setuptools/_distutils/util.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ def byte_compile(
) -> None: ...
def rfc822_escape(header: str) -> str: ...
def is_mingw() -> bool: ...
def is_freethreaded() -> bool: ...
1 change: 1 addition & 0 deletions stubs/setuptools/setuptools/unicode_utils.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
def decompose(path): ...
def normalize(text): ...
def filesys_decode(path): ...
def try_encode(string, enc): ...
Loading