Is your feature request related to a problem? Please describe.
Python 3.10 has added support for pattern matching. It will be good to support it. https://www.python.org/dev/peps/pep-0622/
Describe the solution you'd like .
Describe alternatives you've considered
Reproducer
from dataclasses import dataclass
@dataclass
class Person:
name: str
person = Person("Kate")
match person:
case Person(name):
print(f"Found {name}")
case _:
print("Not found")
black /tmp/dataclass_match.py
error: cannot format /tmp/dataclass_match.py: Cannot parse: 10:6: match person:
Oh no! 💥 💔 💥
1 file failed to reformat.
Additional context Add any other context or screenshots about the feature request
here.
Is your feature request related to a problem? Please describe.
Python 3.10 has added support for pattern matching. It will be good to support it. https://www.python.org/dev/peps/pep-0622/
Describe the solution you'd like .
Describe alternatives you've considered
Reproducer
Additional context Add any other context or screenshots about the feature request
here.