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

Appearance settings

Commit 545d6d6

Browse filesBrowse files
nejchJohnVillalovos
authored andcommitted
chore: add basic type checks to meta tests
1 parent 64e8c31 commit 545d6d6
Copy full SHA for 545d6d6

File tree

Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed
Open diff view settings
Collapse file

‎pyproject.toml‎

Copy file name to clipboardExpand all lines: pyproject.toml
+4-2Lines 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]
Collapse file

‎tests/meta/test_ensure_type_hints.py‎

Copy file name to clipboardExpand all lines: tests/meta/test_ensure_type_hints.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import inspect
1010
from typing import Optional, Type
1111

12-
import _pytest
12+
import pytest
1313

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

2424
def __lt__(self, other: object) -> bool:
2525
if not isinstance(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-
def pytest_generate_tests(metafunc: _pytest.python.Metafunc) -> None:
35+
def pytest_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
def get_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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.