Skip to content

Commit

Permalink
Remove deprecated ignore_pants_warnings in favor of `ignore_warning…
Browse files Browse the repository at this point in the history
…s` (pantsbuild#12032)

[ci skip-rust]
  • Loading branch information
Eric-Arellano authored May 7, 2021
1 parent 0592a16 commit 050c3fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion src/python/pants/init/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def initialize_stdio(global_bootstrap_options: OptionValueContainer) -> Iterator
print_stacktrace = global_bootstrap_options.print_stacktrace

literal_filters = []
regex_filters = cast("list[str]", global_bootstrap_options.ignore_pants_warnings)
regex_filters = []
for filt in cast("list[str]", global_bootstrap_options.ignore_warnings):
if filt.startswith("$regex$"):
regex_filters.append(strip_prefix(filt, "$regex$"))
Expand Down
18 changes: 0 additions & 18 deletions src/python/pants/option/global_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,24 +519,6 @@ def register_bootstrap_options(cls, register):
" ]"
),
)
register(
"--ignore-pants-warnings",
type=list,
member_type=str,
default=[],
daemon=True,
advanced=True,
help="Regexps matching warning strings to ignore, e.g. "
'["DEPRECATED: the option `--my-opt` will be removed"]. The regex patterns will be '
"matched from the start of the warning string, and are case-insensitive.",
removal_version="2.6.0.dev0",
removal_hint=(
"Use the global option `--ignore-warnings` instead.\n\nUnlike this option, "
"`--ignore-warnings` uses literal string matches instead of regex patterns by "
"default. If you would still like to use a regex pattern, prefix the string with "
"`$regex$`."
),
)

register(
"--pants-version",
Expand Down

0 comments on commit 050c3fa

Please sign in to comment.