In
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.