creeper-adventure/.venv/lib/python3.8/site-packages/mypy/server/target.py
2022-03-31 20:20:07 -05:00

8 lines
236 B
Python

def trigger_to_target(s: str) -> str:
assert s[0] == '<'
# Strip off the angle brackets
s = s[1:-1]
# If there is a [wildcard] or similar, strip that off too
if s[-1] == ']':
s = s.split('[')[0]
return s