We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14613de commit 4f47530Copy full SHA for 4f47530
astroid/brain/brain_hypothesis.py
@@ -16,6 +16,8 @@ def a_strategy(draw):
16
17
a_strategy()
18
"""
19
+from typing import TYPE_CHECKING
20
+
21
from astroid.manager import AstroidManager
22
from astroid.nodes.scoped_nodes import FunctionDef
23
@@ -41,7 +43,10 @@ def remove_draw_parameter_from_composite_strategy(node: FunctionDef) -> Function
41
43
first argument (`draw`) - it's always supplied by Hypothesis so we don't
42
44
need to emit the no-value-for-parameter lint.
45
- del node.args.args[0] # type: ignore[union-attr]
46
+ if TYPE_CHECKING:
47
+ assert isinstance(node.args.args, list)
48
49
+ del node.args.args[0]
50
del node.args.annotations[0]
51
del node.args.type_comment_args[0]
52
return node
0 commit comments