Skip to content

Commit

Permalink
Increase typecheck aggression
Browse files Browse the repository at this point in the history
  • Loading branch information
john-kurkowski committed Oct 17, 2023
1 parent cd446dd commit ff9c82d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ write_to = "tldextract/_version.py"
version = {attr = "setuptools_scm.get_version"}

[tool.mypy]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
strict = true

[tool.pytest.ini_options]
addopts = "--doctest-modules"
Expand Down
4 changes: 2 additions & 2 deletions tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_cli_parses_args(monkeypatch: pytest.MonkeyPatch) -> None:


def test_cli_posargs(
capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch
capsys: pytest.CaptureFixture[str], monkeypatch: pytest.MonkeyPatch
) -> None:
"""Test CLI with basic, positional args."""
monkeypatch.setattr(
Expand All @@ -42,7 +42,7 @@ def test_cli_posargs(


def test_cli_namedargs(
capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch
capsys: pytest.CaptureFixture[str], monkeypatch: pytest.MonkeyPatch
) -> None:
"""Test CLI with basic, positional args, and that it parses an optional argument (though it doesn't change output)."""
monkeypatch.setattr(
Expand Down
2 changes: 1 addition & 1 deletion tldextract/suffix_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import cast

import requests
from requests_file import FileAdapter # type: ignore[import]
from requests_file import FileAdapter # type: ignore[import-untyped]

from .cache import DiskCache

Expand Down
5 changes: 4 additions & 1 deletion tldextract/tldextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ class Trie:
"""Trie for storing eTLDs with their labels in reverse-order."""

def __init__(
self, matches: dict | None = None, end: bool = False, is_private: bool = False
self,
matches: dict[str, Trie] | None = None,
end: bool = False,
is_private: bool = False,
) -> None:
"""TODO."""
self.matches = matches if matches else {}
Expand Down

0 comments on commit ff9c82d

Please sign in to comment.