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
2 changes: 1 addition & 1 deletion lib/ts_utils/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ class PackageDependencies(NamedTuple):

@cache
def get_pypi_name_to_typeshed_name_mapping() -> Mapping[str, str]:
return {read_metadata(dir.name).stub_distribution: dir.name for dir in STUBS_PATH.iterdir()}
return {read_metadata(stub_dir.name).stub_distribution: stub_dir.name for stub_dir in STUBS_PATH.iterdir()}


@cache
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exclude = ["**/test_cases/**/*.py"]
# tell ruff not to flag these as e.g. "unused noqa comments"
external = ["F821", "Y"]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"D", # pydocstyle
Expand Down Expand Up @@ -181,6 +182,8 @@ ignore = [
###
# Rules that are out of the control of stub authors:
###
# Names in stubs should match the implementation, even if it's ambiguous.
"A", # flake8-builtins
"F403", # `from . import *` used; unable to detect undefined names
# Stubs can sometimes re-export entire modules.
# Issues with using a star-imported name will be caught by type-checkers.
Expand Down
4 changes: 2 additions & 2 deletions tests/mypy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,13 @@ def main() -> None:
args = parser.parse_args(namespace=CommandLineArgs())
versions = args.python_version or SUPPORTED_VERSIONS
platforms = args.platform or [sys.platform]
filter = args.filter or DIRECTORIES_TO_TEST
path_filter = args.filter or DIRECTORIES_TO_TEST
exclude = args.exclude or []
summary = TestSummary()
with tempfile.TemporaryDirectory() as td:
td_path = Path(td)
for version, platform in product(versions, platforms):
config = TestConfig(args.verbose, filter, exclude, version, platform)
config = TestConfig(args.verbose, path_filter, exclude, version, platform)
version_summary = test_typeshed(args=config, tempdir=td_path)
summary.merge(version_summary)

Expand Down