Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pyreverse] updated docs for filter-mode #9806

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/whatsnew/fragments/9805.other
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Improved clarity for pyreverse help docs after some trouble with usage, more details in linked issue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this. I'll add the correct label so CI still passes.


Closes #9805
28 changes: 11 additions & 17 deletions pylint/pyreverse/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,11 @@
"type": "string",
"action": "store",
"metavar": "<mode>",
"help": """filter attributes and functions according to
<mode>. 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 <mode>. Correct modes are:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you decide to remove the formatting here?

"'PUB_ONLY' - filter all non public attributes;"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PUB_ONLY is the default, and thus we should not remove this information from the help message.

"'ALL' - no filter;"
"'SPECIAL' - filter Python special functions except constructor;"
"'OTHER' - filter protected and private attributes, but not special functions;",
},
),
(
Expand All @@ -76,8 +72,8 @@
"type": "csv",
"dest": "classes",
"default": None,
"help": "create a class diagram with all classes related to <class>;\
this uses by default the options -ASmy",
"help": "create a class diagram with all classes related to <class>;"
"this uses by default the options -ASmy",
},
),
(
Expand Down Expand Up @@ -174,12 +170,10 @@
"default": "dot",
"metavar": "<format>",
"type": "string",
"help": (
"create a *.<format> 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 *.<format> 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.",
},
),
(
Expand Down