Skip to content

Commit 0d5939f

Browse files
Enable reportMissingParameterType in basedpyright (#1586)
1 parent a9dbd6e commit 0d5939f

8 files changed

Lines changed: 20 additions & 14 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ ignore = [ "src/usethis/_version.py" ]
212212
reportAny = false
213213
reportExplicitAny = false
214214
reportImplicitStringConcatenation = false
215-
reportMissingParameterType = false
216215
reportMissingTypeArgument = false
217216
reportUnknownArgumentType = false
218217
reportUnknownMemberType = false

tests/usethis/_backend/test_dispatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_uv_not_used_and_not_available(
4646
):
4747
# Arrange
4848

49-
def mock_call_uv_subprocess(*_, **__):
49+
def mock_call_uv_subprocess(*_: object, **__: object):
5050
raise UVSubprocessFailedError
5151

5252
monkeypatch.setattr(

tests/usethis/_backend/uv/test_available.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_available_when_running_test_suite(self):
1313
def test_mock_not_available(self, monkeypatch: pytest.MonkeyPatch):
1414
# Arrange
1515

16-
def mock_call_uv_subprocess(*_, **__):
16+
def mock_call_uv_subprocess(*_: object, **__: object):
1717
raise UVSubprocessFailedError
1818

1919
monkeypatch.setattr(

tests/usethis/_backend/uv/test_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_matches_pattern(self, tmp_path: Path):
2424

2525
def test_mock_subprocess_failure(self, monkeypatch: pytest.MonkeyPatch):
2626
# Arrange
27-
def mock_call_uv_subprocess(*_, **__) -> str:
27+
def mock_call_uv_subprocess(*_: object, **__: object) -> str:
2828
raise UVSubprocessFailedError
2929

3030
monkeypatch.setattr(

tests/usethis/_core/test_browse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ def test_message(self, capfd: pytest.CaptureFixture[str]):
1414
assert not err
1515
assert "☐ Open URL <https://pypi.org/project/numpy/>." in out
1616

17-
def test_open_in_browser(self, monkeypatch):
17+
def test_open_in_browser(self, monkeypatch: pytest.MonkeyPatch):
1818
# Arrange
1919
class MockLaunch:
2020
def __init__(self):
2121
self.url = None
2222

23-
def __call__(self, url):
23+
def __call__(self, url: str):
2424
self.url = url
2525

2626
mock_launch = MockLaunch()

tests/usethis/_integrations/ci/github/test_tags.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class TestGetGitHubLatestTag:
1414
def test_mock(self, monkeypatch: pytest.MonkeyPatch):
15-
def mock_get(*_, **__):
15+
def mock_get(*_: object, **__: object):
1616
class MockResponse:
1717
def json(self):
1818
return [{"name": "v1.0.0"}]
@@ -27,7 +27,7 @@ def raise_for_status(self):
2727
assert get_github_latest_tag(owner="foo", repo="bar") == "v1.0.0"
2828

2929
def test_http_error(self, monkeypatch: pytest.MonkeyPatch):
30-
def mock_get(*_, **__):
30+
def mock_get(*_: object, **__: object):
3131
class MockResponse:
3232
def raise_for_status(self):
3333
msg = "Failed to fetch tags."
@@ -41,7 +41,7 @@ def raise_for_status(self):
4141
get_github_latest_tag(owner="foo", repo="bar")
4242

4343
def test_no_tags(self, monkeypatch: pytest.MonkeyPatch):
44-
def mock_get(*_, **__):
44+
def mock_get(*_: object, **__: object):
4545
class MockResponse:
4646
def json(self):
4747
return []

tests/usethis/_integrations/environ/test_python.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
class TestGetSupportedMinorPythonVersions:
1313
class TestNoneBackend:
1414
def test_with_requires_python_range(
15-
self, tmp_path: Path, capfd: pytest.CaptureFixture[str], monkeypatch
15+
self,
16+
tmp_path: Path,
17+
capfd: pytest.CaptureFixture[str],
18+
monkeypatch: pytest.MonkeyPatch,
1619
):
1720
# Arrange
1821

@@ -81,7 +84,9 @@ def test_with_single_version(
8184
assert "Current Python interpreter" in out
8285
assert "outside requires-python bounds" in out
8386

84-
def test_no_pyproject_toml(self, tmp_path: Path, monkeypatch):
87+
def test_no_pyproject_toml(
88+
self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
89+
):
8590
# Arrange
8691

8792
monkeypatch.setattr(
@@ -97,7 +102,9 @@ def test_no_pyproject_toml(self, tmp_path: Path, monkeypatch):
97102
current = PythonVersion.from_interpreter()
98103
assert versions == [current]
99104

100-
def test_no_requires_python(self, tmp_path: Path, monkeypatch):
105+
def test_no_requires_python(
106+
self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
107+
):
101108
# Arrange
102109

103110
monkeypatch.setattr(

tests/usethis/test_deps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def test_dev_group_not_registered(self, uv_init_dir: Path):
576576
def test_uv_subprocess_error(
577577
self, uv_init_dir: Path, monkeypatch: pytest.MonkeyPatch
578578
):
579-
def mock_call_uv_subprocess(*_, **__):
579+
def mock_call_uv_subprocess(*_: object, **__: object):
580580
raise UVSubprocessFailedError
581581

582582
monkeypatch.setattr(
@@ -762,7 +762,7 @@ def test_uv_subprocess_error(
762762
# Arrange
763763
add_deps_to_group([Dependency(name="pytest")], "test")
764764

765-
def mock_call_uv_subprocess(*_, **__):
765+
def mock_call_uv_subprocess(*_: object, **__: object):
766766
raise UVSubprocessFailedError
767767

768768
monkeypatch.setattr(

0 commit comments

Comments
 (0)