Files
openide/python/testData/resolve/FStringInsideAssertStatement.py
Mikhail Golubev 1d3eda1e2d PY-22094 Include assert statements in CFG to resolve names in f-strings inside
Otherwise it's impossible to flow-sensitively resolve names referenced
inside such f-strings since we use the containing statement as the anchor
node in the graph.
2017-03-28 16:44:21 +02:00

5 lines
136 B
Python

def test(name: str) -> int:
assert name is not None, f'{name} is None'
# <ref>
return len(name)