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
The problem is that the is_identifier function proposed is too restrictive:
def is_identifier(string):
"""
Replacement for `str.isidentifier` when it is not available (e.g. on Python 2).
:param string:
:return:
"""
if len(string) == 0 or string[0].isdigit():
return False
return all([s.isalnum() for s in string.split("_")])
# problem with double underscores or leading underscores
is_identifier("_hello") # False
is_identifier("hell__o") # False
Introduced in https://github.com/smarie/python-makefun/pull/80/files#diff-bcc8a023b385d782aa46679024c444b0d2e51478e3dc467e41c7209899aab9dfR30
Result impacts some build in pytest-cases: https://github.com/smarie/python-pytest-cases/actions/runs/4247221202/jobs/7385011101#step:8:168
The text was updated successfully, but these errors were encountered: