Skip to content

Commit

Permalink
refactor: rename BuildArguments.ignore_warning_strings to ignore_warn…
Browse files Browse the repository at this point in the history
…ing_strs

Follows the old code
  • Loading branch information
hfudev committed Sep 16, 2024
1 parent 8f9ca88 commit 7d82c49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions idf_build_apps/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ class BuildArguments(FindBuildArguments):
)
_collect_app_info: t.Optional[str] = field(init=False, repr=False, default=None)
ignore_warning_str: InitVar[t.Optional[t.List[str]]] = _Field.UNSET
ignore_warning_strings: t.Optional[t.List[str]] = field(
ignore_warning_strs: t.Optional[t.List[str]] = field(
default=None,
metadata=asdict(
FieldMetadata(
Expand Down Expand Up @@ -847,14 +847,14 @@ def __post_init__( # type: ignore
config_rules_str=config_rules_str,
)

self.set_deprecated_field('ignore_warning_strings', 'ignore_warning_str', ignore_warning_str)
self.set_deprecated_field('ignore_warning_strs', 'ignore_warning_str', ignore_warning_str)
self.set_deprecated_field('ignore_warning_files', 'ignore_warning_file', ignore_warning_file)

self.ignore_warning_strings = to_list(self.ignore_warning_strings) or []
self.ignore_warning_strs = to_list(self.ignore_warning_strs) or []

ignore_warnings_regexes = []
if self.ignore_warning_strings:
for s in self.ignore_warning_strings:
if self.ignore_warning_strs:
for s in self.ignore_warning_strs:
ignore_warnings_regexes.append(re.compile(s))
if self.ignore_warning_files:
for s in self.ignore_warning_files:
Expand Down

0 comments on commit 7d82c49

Please sign in to comment.