Remove do_conf_str(encoding:)

It wasn't being used.
pull/11976/head
Tristan Partin 1 year ago
parent 020692b9d9
commit 9b86c67e19
  1. 4
      mesonbuild/utils/universal.py

@ -1262,7 +1262,7 @@ def get_variable_regex(variable_format: Literal['meson', 'cmake', 'cmake@'] = 'm
def do_conf_str(src: str, data: T.List[str], confdata: 'ConfigurationData',
variable_format: Literal['meson', 'cmake', 'cmake@'],
encoding: str = 'utf-8', subproject: T.Optional[SubProject] = None) -> T.Tuple[T.List[str], T.Set[str], bool]:
subproject: T.Optional[SubProject] = None) -> T.Tuple[T.List[str], T.Set[str], bool]:
def line_is_valid(line: str, variable_format: str) -> bool:
if variable_format == 'meson':
if '#cmakedefine' in line:
@ -1307,7 +1307,7 @@ def do_conf_file(src: str, dst: str, confdata: 'ConfigurationData',
except Exception as e:
raise MesonException(f'Could not read input file {src}: {e!s}')
(result, missing_variables, confdata_useless) = do_conf_str(src, data, confdata, variable_format, encoding, subproject)
(result, missing_variables, confdata_useless) = do_conf_str(src, data, confdata, variable_format, subproject)
dst_tmp = dst + '~'
try:
with open(dst_tmp, 'w', encoding=encoding, newline='') as f:

Loading…
Cancel
Save