Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit545d6d6

Browse files
nejchJohnVillalovos
authored andcommitted
chore: add basic type checks to meta tests
1 parent64e8c31 commit545d6d6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

‎pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ module = [
1414
"docs.ext.*",
1515
"tests.functional.*",
1616
"tests.functional.api.*",
17-
"tests.meta.*",
1817
"tests.unit.*",
1918
]
2019
ignore_errors =true
2120

2221
[[tool.mypy.overrides]]
23-
module ="tests.smoke.*"
22+
module = [
23+
"tests.meta.*",
24+
"tests.smoke.*",
25+
]
2426
disable_error_code = ["no-untyped-def"]
2527

2628
[tool.semantic_release]

‎tests/meta/test_ensure_type_hints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
importinspect
1010
fromtypingimportOptional,Type
1111

12-
import_pytest
12+
importpytest
1313

1414
importgitlab.mixins
1515
importgitlab.v4.objects
@@ -19,7 +19,7 @@
1919
@dataclasses.dataclass(frozen=True)
2020
classClassInfo:
2121
name:str
22-
type:Type
22+
type:Type# type: ignore[type-arg]
2323

2424
def__lt__(self,other:object)->bool:
2525
ifnotisinstance(other,ClassInfo):
@@ -32,7 +32,7 @@ def __eq__(self, other: object) -> bool:
3232
return (self.type.__module__,self.name)== (other.type.__module__,other.name)
3333

3434

35-
defpytest_generate_tests(metafunc:_pytest.python.Metafunc)->None:
35+
defpytest_generate_tests(metafunc:pytest.Metafunc)->None:
3636
"""Find all of the classes in gitlab.v4.objects and pass them to our test
3737
function"""
3838

@@ -106,7 +106,7 @@ def test_check_get_without_id_function_type_hints(
106106
defget_check_helper(
107107
self,
108108
*,
109-
base_type:Type,
109+
base_type:Type,# type: ignore[type-arg]
110110
class_info:ClassInfo,
111111
method_template:str,
112112
optional_return:bool,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp