You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(compare_singleton_primitives_by_is): compare Name directly instead of QualifiedName (#391)
fixes#378 and #375 which are caused by Instagram/LibCST#389.
Qualifying a name will never make some thing that wasn't already
True/False/None into a True/False/None:
```python
import libcst as cst
from libcst.metadata.name_provider import QualifiedNameProvider
from textwrap import dedent
wrapper = cst.MetadataWrapper(
cst.parse_module(dedent(
'''
x = None
x()
'''
))
)
x_ref = wrapper.module.body[1].body[0].value
print(wrapper.resolve(QualifiedNameProvider)[x_ref]())
```
prints:
```python
{QualifiedName(name='x', source=<QualifiedNameSource.LOCAL: 3>)}
```
Co-authored-by: Amethyst Reese <[email protected]>
0 commit comments