optinterpreter: Add type annotations to is_invalid_name

pull/4931/head
Dylan Baker 6 years ago
parent 863de72599
commit 05ad69a1c7
  1. 2
      mesonbuild/optinterpreter.py

@ -24,7 +24,7 @@ forbidden_option_names = set(coredata.builtin_options.keys())
forbidden_prefixes = [lang + '_' for lang in compilers.all_languages] + ['b_', 'backend_']
reserved_prefixes = ['cross_']
def is_invalid_name(name):
def is_invalid_name(name: str) -> bool:
if name in forbidden_option_names:
return True
pref = name.split('_')[0] + '_'

Loading…
Cancel
Save