From 371e985670737bf15cdf4f50b5ceb3bb2e37eb71 Mon Sep 17 00:00:00 2001 From: kidp330 Date: Tue, 16 Jul 2024 21:06:10 +0200 Subject: [PATCH 1/5] [pyreverse] updated docs for filter-mode --- pylint/pyreverse/main.py | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/pylint/pyreverse/main.py b/pylint/pyreverse/main.py index 3ba0b6c77d..313a20fbd8 100644 --- a/pylint/pyreverse/main.py +++ b/pylint/pyreverse/main.py @@ -56,15 +56,11 @@ "type": "string", "action": "store", "metavar": "", - "help": """filter attributes and functions according to - . Correct modes are : - 'PUB_ONLY' filter all non public attributes - [DEFAULT], equivalent to PRIVATE+SPECIAL_A - 'ALL' no filter - 'SPECIAL' filter Python special functions - except constructor - 'OTHER' filter protected and private - attributes""", + "help": "filter attributes and functions according to . Correct modes are:" + "'PUB_ONLY' - filter all non public attributes;" + "'ALL' - no filter;" + "'SPECIAL' - filter Python special functions except constructor;" + "'OTHER' - filter protected and private attributes, but not special functions;", }, ), ( @@ -76,8 +72,8 @@ "type": "csv", "dest": "classes", "default": None, - "help": "create a class diagram with all classes related to ;\ - this uses by default the options -ASmy", + "help": "create a class diagram with all classes related to ;" + "this uses by default the options -ASmy", }, ), ( @@ -174,12 +170,10 @@ "default": "dot", "metavar": "", "type": "string", - "help": ( - "create a *. output file if format is available. Available " - f"formats are: {', '.join(DIRECTLY_SUPPORTED_FORMATS)}. Any other " - f"format will be tried to create by means of the 'dot' command line " - f"tool, which requires a graphviz installation." - ), + "help": "create a *. output file if format is available. Available " + f"formats are: {', '.join(DIRECTLY_SUPPORTED_FORMATS)}. Any other " + f"format will be tried to create by means of the 'dot' command line " + f"tool, which requires a graphviz installation.", }, ), ( @@ -301,9 +295,7 @@ def run(self, args: list[str]) -> int: if not args: print(self.help()) return 1 - extra_packages_paths = list( - {discover_package_path(arg, self.config.source_roots) for arg in args} - ) + extra_packages_paths = list({discover_package_path(arg, self.config.source_roots) for arg in args}) with augmented_sys_path(extra_packages_paths): project = project_from_files( args, From 1fc441fd861e9f0549504d6dbcc35a0a3fdc2e86 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:19:04 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pylint/pyreverse/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pylint/pyreverse/main.py b/pylint/pyreverse/main.py index 313a20fbd8..67fe751e64 100644 --- a/pylint/pyreverse/main.py +++ b/pylint/pyreverse/main.py @@ -295,7 +295,9 @@ def run(self, args: list[str]) -> int: if not args: print(self.help()) return 1 - extra_packages_paths = list({discover_package_path(arg, self.config.source_roots) for arg in args}) + extra_packages_paths = list( + {discover_package_path(arg, self.config.source_roots) for arg in args} + ) with augmented_sys_path(extra_packages_paths): project = project_from_files( args, From 42aca42810fb9ef98962a19de6a8b58cd0b2a5ff Mon Sep 17 00:00:00 2001 From: kidp330 Date: Tue, 16 Jul 2024 21:30:45 +0200 Subject: [PATCH 3/5] Add towncrier fragment --- doc/whatsnew/fragments/9805.other | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/whatsnew/fragments/9805.other diff --git a/doc/whatsnew/fragments/9805.other b/doc/whatsnew/fragments/9805.other new file mode 100644 index 0000000000..16292816dd --- /dev/null +++ b/doc/whatsnew/fragments/9805.other @@ -0,0 +1,4 @@ +Improved clarity for pyreverse help docs after some trouble with usage, more details in linked issue + +Refs #9805 +Closes #9805 \ No newline at end of file From 4ec438cbe8d381b86c4165de3e9f95e44207de94 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:33:01 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/whatsnew/fragments/9805.other | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/whatsnew/fragments/9805.other b/doc/whatsnew/fragments/9805.other index 16292816dd..c8c57144e3 100644 --- a/doc/whatsnew/fragments/9805.other +++ b/doc/whatsnew/fragments/9805.other @@ -1,4 +1,4 @@ Improved clarity for pyreverse help docs after some trouble with usage, more details in linked issue Refs #9805 -Closes #9805 \ No newline at end of file +Closes #9805 From 023e9276d0537d41803873c6beccfaf9792b4738 Mon Sep 17 00:00:00 2001 From: kidp330 Date: Tue, 16 Jul 2024 21:30:45 +0200 Subject: [PATCH 5/5] Add towncrier fragment --- doc/whatsnew/fragments/9805.other | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/whatsnew/fragments/9805.other b/doc/whatsnew/fragments/9805.other index c8c57144e3..6f0eb1f2c3 100644 --- a/doc/whatsnew/fragments/9805.other +++ b/doc/whatsnew/fragments/9805.other @@ -1,4 +1,3 @@ Improved clarity for pyreverse help docs after some trouble with usage, more details in linked issue -Refs #9805 Closes #9805