Commit 11a040d
authored
Add
Closes #13243.
For the most part, in order to determine which fields where worth
pattern matching against, I looked at what was being displayed in the
`StrConv` class (defined in `mypy/strconv.py`). I might've missed some
fields, but for the most part all of the important ones are there.
In addition, to make pattern matching feel more natural, I re-arranged
the fields to better align with how they look in the source code. For
example, when matching against `OpExpr`, you would do:
```python
match o:
case OpExpr(IntExpr(1), "+", IntExpr(2)):
pass
```
instead of:
```python
match o:
case OpExpr("+", IntExpr(1), IntExpr(2)):
pass
```__match_args__ to node types (#13330)1 parent bc78eb5 commit 11a040d
3 files changed
+142
-2
lines changed
0 commit comments