remove FORBIDDEN_NAMES (no more getattr)
This commit is contained in:
parent
f779c8f36d
commit
754d4a6e00
1 changed files with 0 additions and 4 deletions
|
@ -35,9 +35,6 @@ STATIC_TUPLE = frozenset()
|
||||||
|
|
||||||
submulti = 2
|
submulti = 2
|
||||||
NAME_REGEXP = re.compile(r'^[a-zA-Z][a-zA-Z\d_-]*$')
|
NAME_REGEXP = re.compile(r'^[a-zA-Z][a-zA-Z\d_-]*$')
|
||||||
FORBIDDEN_NAMES = frozenset(['iter_all', 'iter_group', 'find', 'find_first',
|
|
||||||
'make_dict', 'read_only',
|
|
||||||
'read_write', 'getowner', 'set_contexts'])
|
|
||||||
|
|
||||||
|
|
||||||
def valid_name(name):
|
def valid_name(name):
|
||||||
|
@ -46,7 +43,6 @@ def valid_name(name):
|
||||||
if not isinstance(name, str):
|
if not isinstance(name, str):
|
||||||
return False
|
return False
|
||||||
return re.match(NAME_REGEXP, name) is not None and \
|
return re.match(NAME_REGEXP, name) is not None and \
|
||||||
name not in FORBIDDEN_NAMES and \
|
|
||||||
not name.startswith('impl_') and \
|
not name.startswith('impl_') and \
|
||||||
not name.startswith('cfgimpl_')
|
not name.startswith('cfgimpl_')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue