config option for allowing certain functions:print/anything
and basedtyping.HasHelpfulString/`basedtyping.UnhelpfulString, which can be used:
# HasHelpfulString is a kinda protocol for a type that has `__str__` etc
def thing(a: HasHelpfulString):
f = f"asdf/{a}"
thing(None) # error
thing(1) # no error
# UnhelpfulString is a string that is allowed to contain stupid stuff
def print(s: UnhelpfulString): ...
print(f"{None}") # okay, because the resulting string will be going to a `UnhelpfulString`
include/exclude config options:
config option for allowing
None
?config option for allowing certain functions:
print
/anythingand
basedtyping.HasHelpfulString
/`basedtyping.UnhelpfulString
, which can be used: