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

Commit64e8c31

Browse files
nejchJohnVillalovos
authored andcommitted
chore: add basic typing to smoke tests
1 parent0b2f6bc commit64e8c31

File tree

4 files changed

+10
-24
lines changed

4 files changed

+10
-24
lines changed

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
-requests-toolbelt==0.9.1
3131
files:'gitlab/'
3232
-repo:https://github.com/pre-commit/mirrors-mypy
33-
rev:v0.961
33+
rev:v0.981
3434
hooks:
3535
-id:mypy
3636
args:[]

‎pyproject.toml‎

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,7 @@ order_by_type = false
66
[tool.mypy]
77
files ="."
88
exclude ="build/.*"
9-
10-
# 'strict = true' is equivalent to the following:
11-
check_untyped_defs =true
12-
disallow_any_generics =true
13-
disallow_incomplete_defs =true
14-
disallow_subclassing_any =true
15-
disallow_untyped_decorators =true
16-
disallow_untyped_defs =true
17-
no_implicit_optional =true
18-
no_implicit_reexport =true
19-
strict_equality =true
20-
warn_redundant_casts =true
21-
warn_return_any =true
22-
warn_unused_configs =true
23-
warn_unused_ignores =true
24-
25-
# The following need to have changes made to be able to enable them:
26-
# disallow_untyped_calls = true
9+
strict =true
2710

2811
[[tool.mypy.overrides]]# Overrides for currently untyped modules
2912
module = [
@@ -33,10 +16,13 @@ module = [
3316
"tests.functional.api.*",
3417
"tests.meta.*",
3518
"tests.unit.*",
36-
"tests.smoke.*"
3719
]
3820
ignore_errors =true
3921

22+
[[tool.mypy.overrides]]
23+
module ="tests.smoke.*"
24+
disable_error_code = ["no-untyped-def"]
25+
4026
[tool.semantic_release]
4127
branch ="main"
4228
version_variable ="gitlab/_version.py:__version__"

‎requirements-lint.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ pylint==2.15.3
88
pytest==7.1.3
99
types-PyYAML==6.0.12
1010
types-requests==2.28.11.2
11-
types-setuptools==64.0.1
11+
types-setuptools==65.5.0.1

‎tests/smoke/test_dists.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919

2020
@pytest.fixture(scope="function")
21-
defbuild():
22-
sandbox.run_setup("setup.py", ["--quiet","clean","--all"])
23-
returnsandbox.run_setup("setup.py", ["--quiet","sdist","bdist_wheel"])
21+
defbuild()->None:
22+
sandbox.run_setup("setup.py", ["--quiet","clean","--all"])# type: ignore[no-untyped-call]
23+
sandbox.run_setup("setup.py", ["--quiet","sdist","bdist_wheel"])# type: ignore[no-untyped-call]
2424

2525

2626
deftest_sdist_includes_tests(build):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp