Skip to content

Commit 41b6f28

Browse files
committed
style: make mypy 2.0 happy
1 parent c53da77 commit 41b6f28

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ build_command = "pip install hatch && hatch build"
146146
minversion = "6.0"
147147
addopts = "-ra -vv -rf --ignore=bundled --ignore=.hatch"
148148
filterwarnings = [
149-
"ignore:.*Using or importing the ABCs from 'collections' instead of from 'collections.abc'.*:DeprecationWarning",
150-
"ignore:cannot collect test class 'TestCaseDefinition'.*:pytest.PytestCollectionWarning",
149+
"ignore:.*Using or importing the ABCs from 'collections' instead of from 'collections.abc'.*:DeprecationWarning",
150+
"ignore:cannot collect test class 'TestCaseDefinition'.*:pytest.PytestCollectionWarning",
151151
]
152152
testpaths = ["tests"]
153153
junit_suite_name = "robotcode"
@@ -241,9 +241,7 @@ mark-parentheses = false
241241
# at call sites that import the wrapper. The defining module itself
242242
# (model.py) needs an additional per-file ignore (see above) because ruff
243243
# resolves the local name independently.
244-
extend-immutable-calls = [
245-
"robotcode.robot.config.model.field",
246-
]
244+
extend-immutable-calls = ["robotcode.robot.config.model.field"]
247245

248246

249247
[tool.mypy]
@@ -321,6 +319,8 @@ exclude = [
321319
"**/__pycache__",
322320
"bundled/libs",
323321
"intellij-client/build",
322+
"**/.*",
323+
".venv",
324324
]
325325
typeCheckingMode = "off"
326326
pythonVersion = "3.10"

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from hashlib import sha512
1414
from io import StringIO
1515
from pathlib import Path
16-
from typing import Type, cast
16+
from typing import Any, Callable, Type, cast
1717

1818
import pytest
1919
from _pytest._code.code import ExceptionInfo, TerminalRepr
@@ -29,8 +29,8 @@
2929
open = functools.partial(open, encoding="utf-8")
3030

3131

32-
_converters_pre = []
33-
_converters_post = []
32+
_converters_pre: list[Callable[..., Any]] = []
33+
_converters_post: list[Callable[..., Any]] = []
3434

3535

3636
def register_converter_pre(function):

0 commit comments

Comments
 (0)