Skip to content

Commit

Permalink
Merge branch 'main' into renovate/pip-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Feb 1, 2024
2 parents d606321 + 3e0c370 commit ee9d477
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ repos:
hooks:
- id: ruff
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1 # must match pyproject.toml AND the black used by blacken-docs
rev: 24.1.1 # must match pyproject.toml AND the black used by blacken-docs
hooks:
- id: black
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0 # must match pyproject.toml
hooks:
- id: blacken-docs
additional_dependencies: [black==23.12.1]
additional_dependencies: [black==24.1.1]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
Expand Down
4 changes: 2 additions & 2 deletions examples/example.csv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions examples/example.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions examples/example.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typecheck = [
# That's deliberate (it's not necessary to run them all locally).
# This file just lists the ones which it's convenient to have around locally.
misc-lint = [
"black==23.12.1",
"black==24.1.1",
"blacken-docs==1.16.0",
"pre-commit-hooks==4.5.0",
"ruff==0.1.15",
Expand Down
12 changes: 4 additions & 8 deletions scripts/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def run_checks(
regenerate_examples: Literal[True],
typeshed_dir: Path,
download_typeshed: Literal[False] = ...,
) -> None:
...
) -> None: ...


@overload
Expand All @@ -25,8 +24,7 @@ def run_checks(
regenerate_examples: Literal[True],
download_typeshed: Literal[True],
typeshed_dir: None = ...,
) -> None:
...
) -> None: ...


@overload
Expand All @@ -35,8 +33,7 @@ def run_checks(
regenerate_examples: Literal[False],
download_typeshed: Literal[False] = ...,
typeshed_dir: None = ...,
) -> None:
...
) -> None: ...


@overload
Expand All @@ -45,8 +42,7 @@ def run_checks(
regenerate_examples: bool = ...,
typeshed_dir: Path | None = ...,
download_typeshed: bool = ...,
) -> None:
...
) -> None: ...


def run_checks(
Expand Down
6 changes: 2 additions & 4 deletions src/typeshed_stats/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,11 @@ def stats_to_csv(stats: Sequence[PackageInfo | FileInfo]) -> str:


@typing.overload
def _stats_from_csv(data: str, cls: type[PackageInfo]) -> list[PackageInfo]:
...
def _stats_from_csv(data: str, cls: type[PackageInfo]) -> list[PackageInfo]: ...


@typing.overload
def _stats_from_csv(data: str, cls: type[FileInfo]) -> list[FileInfo]:
...
def _stats_from_csv(data: str, cls: type[FileInfo]) -> list[FileInfo]: ...


def _stats_from_csv(
Expand Down
13 changes: 8 additions & 5 deletions tests/test__cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,14 @@ def test_KeyboardInterrupt_caught(
args: list[str], typeshed: Path, capsys: pytest.CaptureFixture[str]
) -> None:
args += ["--log", "CRITICAL"]
with pytest.raises(SystemExit) as exc_info, mock.patch.object(
typeshed_stats.gather,
"gather_stats_on_package",
autospec=True,
side_effect=KeyboardInterrupt(),
with (
pytest.raises(SystemExit) as exc_info,
mock.patch.object(
typeshed_stats.gather,
"gather_stats_on_package",
autospec=True,
side_effect=KeyboardInterrupt(),
),
):
main(args)

Expand Down
13 changes: 8 additions & 5 deletions tests/test_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,10 +1225,13 @@ def test_basic_sanity_checks(subtests: SubTests) -> None:


def test_exceptions_bubble_up(typeshed: Path) -> None:
with pytest.raises(KeyError), mock.patch.object(
typeshed_stats.gather,
"gather_stats_on_package",
autospec=True,
side_effect=KeyError,
with (
pytest.raises(KeyError),
mock.patch.object(
typeshed_stats.gather,
"gather_stats_on_package",
autospec=True,
side_effect=KeyError,
),
):
gather_stats_on_multiple_packages(typeshed_dir=typeshed)

0 comments on commit ee9d477

Please sign in to comment.