Skip to content

Commit 3a78f59

Browse files
committed
🧪 Disallow expressions returning Any type
1 parent 9c964aa commit 3a78f59

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

‎.mypy.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ files =
99
check_untyped_defs = true
1010

1111
disallow_any_explicit = true
12-
# disallow_any_expr = true # crashes with some decorators like `@functools.cache` and `@pytest.mark.parametrize`
12+
disallow_any_expr = true
1313
disallow_any_decorated = true
1414
disallow_any_generics = true
1515
disallow_any_unimported = true
@@ -58,5 +58,7 @@ warn_unused_configs = true
5858
warn_unused_ignores = true
5959

6060
[mypy-tests.*]
61+
# crashes with some decorators like `@functools.cache` and `@pytest.mark.parametrize`:
62+
disallow_any_expr = false
6163
# fails on `@hypothesis.given()`:
6264
disallow_any_decorated = false

‎nitpick-style.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ error_summary = true
8484
check_untyped_defs = true
8585

8686
disallow_any_explicit = true
87-
# disallow_any_expr = true # crashes with some decorators like `@functools.cache` and `@pytest.mark.parametrize`
87+
disallow_any_expr = true # crashes with some decorators like `@functools.cache` and `@pytest.mark.parametrize`
8888
disallow_any_decorated = true # fails on `@hypothesis.given()`
8989
disallow_any_generics = true
9090
disallow_any_unimported = true

‎src/awx_plugins/interfaces/_temporary_private_licensing_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
__all__ = () # noqa: WPS410
1111

1212

13-
@functools.cache
13+
@functools.cache # type: ignore[misc]
1414
def detect_server_product_name() -> str:
1515
"""Compute the official runtime name.
1616

0 commit comments

Comments
 (0)