diff --git a/deptry/deprecate/ignore_flags.py b/deptry/deprecate/ignore_flags.py index 707e8a67..98a5ed48 100644 --- a/deptry/deprecate/ignore_flags.py +++ b/deptry/deprecate/ignore_flags.py @@ -18,7 +18,7 @@ def generate_deprecation_warning(flag_name: str, issue_code: str, sequence: tupl sequence_as_list_string = "[" + ", ".join(f'"{x}"' for x in sequence) + "]" return ( f"Warning: In an upcoming release, support for the `--{flag_name}` command-line option and the" - f" `{flag_name.replace('-','_')}` configuration parameter will be discontinued. Instead, use" + f" `{flag_name.replace('-', '_')}` configuration parameter will be discontinued. Instead, use" f" `--per-rule-ignores {issue_code}={'|'.join(sequence)}` or add a line `{issue_code} =" f" {sequence_as_list_string}` to the `[tool.deptry.per_rule_ignores]` section of the configuration file." ) diff --git a/deptry/deprecate/skip_flags.py b/deptry/deprecate/skip_flags.py index 932df660..1c3d0bc3 100644 --- a/deptry/deprecate/skip_flags.py +++ b/deptry/deprecate/skip_flags.py @@ -13,7 +13,7 @@ def generate_deprecation_warning(flag_name: str, issue_code: str) -> str: return ( f"Warning: In an upcoming release, support for the `--{flag_name}` command-line option and the" - f" `{flag_name.replace('-','_')}` configuration parameter will be discontinued. Instead, use `--ignore" + f" `{flag_name.replace('-', '_')}` configuration parameter will be discontinued. Instead, use `--ignore" f" {issue_code}` or add a line `ignore = ['{issue_code}']` to the `[tool.deptry]` section of the configuration" " file." )