Instagram / Instagram/LibCST

Matchers do not match base classes

Open
#1,366 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
229
PR merge metrics
No merged PRs in 30d

Description

In
```Python
import libcst as cst
import libcst.matchers as m

m.matches(cst.SimpleString("'foo'"), m.SimpleString) # True
m.matches(cst.SimpleString("'foo'"), m.BaseString) # False
```
I expect both statements to be true. Otherwise, you need to use `OneOf` or `|` on all string types. The same applies for numbers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.