| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 500895a commit 884e7a3
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,6 @@ module = [ | |||
| 26 | 26 | "gitlab.v4.objects.sidekiq", | |
| 27 | 27 | "tests.functional.*", | |
| 28 | 28 | "tests.functional.api.*", | |
| 29 | - "tests.meta.*", | ||
| 30 | 29 | "tests.unit.*", | |
| 31 | 30 | "tests.smoke.*" | |
| 32 | 31 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,3 +5,4 @@ mypy==0.910 | |||
| 5 | 5 | types-PyYAML==6.0.1 | |
| 6 | 6 | types-requests==2.26.0 | |
| 7 | 7 | types-setuptools==57.4.2 | |
| 8 | + types-toml==0.10.1 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,13 +7,14 @@ | |||
| 7 | 7 | import inspect | |
| 8 | 8 | from typing import Tuple, Type | |
| 9 | 9 | ||
| 10 | + import _pytest | ||
| 10 | 11 | import toml | |
| 11 | 12 | ||
| 12 | 13 | import gitlab.mixins | |
| 13 | 14 | import gitlab.v4.objects | |
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | - def pytest_generate_tests(metafunc): | ||
| 17 | + def pytest_generate_tests(metafunc: _pytest.python.Metafunc) -> None: | ||
| 17 | 18 | """Find all of the classes in gitlab.v4.objects and pass them to our test | |
| 18 | 19 | function""" | |
| 19 | 20 | ||
@@ -54,7 +55,7 @@ def pytest_generate_tests(metafunc): | |||
| 54 | 55 | ||
| 55 | 56 | ||
| 56 | 57 | class TestTypeHints: | |
| 57 | - def test_check_get_function_type_hints(self, class_info: Tuple[str, Type]): | ||
| 58 | + def test_check_get_function_type_hints(self, class_info: Tuple[str, Type]) -> None: | ||
| 58 | 59 | """Ensure classes derived from GetMixin have defined a 'get()' method with | |
| 59 | 60 | correct type-hints. | |
| 60 | 61 | """ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,7 +49,7 @@ class Wrongv4Object(RESTObject, Mixin): | |||
| 49 | 49 | import gitlab.v4.objects | |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | - def test_show_issue(): | ||
| 52 | + def test_show_issue() -> None: | ||
| 53 | 53 | """Test case to demonstrate the TypeError that occurs""" | |
| 54 | 54 | ||
| 55 | 55 | class RESTObject(object): | |
@@ -61,7 +61,7 @@ class Mixin(RESTObject): | |||
| 61 | 61 | ||
| 62 | 62 | with pytest.raises(TypeError) as exc_info: | |
| 63 | 63 | # Wrong ordering here | |
| 64 | - class Wrongv4Object(RESTObject, Mixin): | ||
| 64 | + class Wrongv4Object(RESTObject, Mixin): # type: ignore | ||
| 65 | 65 | ... | |
| 66 | 66 | ||
| 67 | 67 | # The error message in the exception should be: | |
@@ -76,7 +76,7 @@ class Correctv4Object(Mixin, RESTObject): | |||
| 76 | 76 | ... | |
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | - def test_mros(): | ||
| 79 | + def test_mros() -> None: | ||
| 80 | 80 | """Ensure objects defined in gitlab.v4.objects have REST* as last item in | |
| 81 | 81 | class definition. | |
| 82 | 82 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments