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 42b289d commit 279e8ccCopy full SHA for 279e8cc
tests/functional/ext/mccabe/mccabe.py
@@ -327,9 +327,9 @@ def nested_match_case(data): # [too-complex]
327
match data:
328
case {"type": "user", "data": user_data}:
329
match user_data: # Nested match adds complexity
330
- case {"name": str(name)}:
+ case {"name": str() as name}:
331
return f"User: {name}"
332
- case {"id": int(user_id)}:
+ case {"id": int() as user_id}:
333
return f"User ID: {user_id}"
334
case _:
335
return "Unknown user format"
tests/functional/p/pattern_matching.py
@@ -1,4 +1,5 @@
1
# pylint: disable=missing-docstring,invalid-name,too-few-public-methods
2
+# pylint: disable=match-class-positional-attributes
3
4
class Point2D:
5
__match_args__ = ("x", "y")
0 commit comments