Skip to content

Commit e580953

Browse files
adamtheturtleclaude
andcommitted
Use the pyrefly strict preset
The strict preset enables unused-ignore along with implicit-any, missing-override-decorator and other checks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 5c8343b commit e580953

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ search_path = [
374374
"src",
375375
]
376376
errors.non-exhaustive-match = "error"
377-
errors.unused-ignore = "error"
377+
preset = "strict"
378378

379379
[tool.pyright]
380380
typeCheckingMode = "strict"

tests/test_model_target_web_api_details.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# pyright: reportPrivateUsage=false
22
# pylint: disable=protected-access,super-init-not-called
3-
# ruff: noqa: ANN401, SLF001
3+
# ruff: noqa: SLF001
44
"""Tests for Model Target Web API detail helpers."""
55

66
import re
7-
from typing import Any
7+
from typing import Any, override
88

99
import pytest
1010
import requests
@@ -31,16 +31,19 @@ def __init__(
3131
self._current_url = current_url
3232

3333
@property
34+
@override
3435
def current_url(self) -> str:
3536
"""Return the controlled browser URL."""
3637
return self._current_url
3738

39+
@override
3840
def execute_script(self, script: str, *args: object) -> object:
3941
"""Return the controlled user agent."""
4042
assert script == "return navigator.userAgent"
4143
assert not args
4244
return self._user_agent
4345

46+
@override
4447
def get_cookies(self) -> Any:
4548
"""Return the controlled cookies."""
4649
return self._cookies
@@ -186,6 +189,7 @@ def __init__(
186189
self.send_kwargs: dict[str, object] | None = None
187190
self._response = response
188191

192+
@override
189193
def send( # noqa: V105
190194
self,
191195
request: requests.PreparedRequest,
@@ -202,6 +206,7 @@ def send( # noqa: V105
202206
class _FailingSession(requests.Session):
203207
"""A requests session which fails before receiving a response."""
204208

209+
@override
205210
def send( # noqa: V105
206211
self,
207212
request: requests.PreparedRequest,

tests/test_vumark_target_link.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# pyright: reportPrivateUsage=false
22
# pylint: disable=protected-access,super-init-not-called
3-
# ruff: noqa: ANN401, SLF001
3+
# ruff: noqa: SLF001
44
"""Tests for finding VuMark target links."""
55

6-
from typing import Any
6+
from typing import Any, override
77

88
import pytest
99
from selenium.webdriver.remote.webdriver import WebDriver
@@ -18,6 +18,7 @@ class _NoElementsDriver(WebDriver):
1818
def __init__(self) -> None:
1919
"""Avoid starting a browser session."""
2020

21+
@override
2122
def find_elements( # noqa: V105
2223
self,
2324
*args: Any,

0 commit comments

Comments
 (0)