Resolve ruff line length 88 rule in args. Changing small lines but adding a noqa ignore directive to longer lines that look best as they are. Their dedented length is still less than 88

This commit is contained in:
Micah Jerome Ellison 2023-07-03 10:13:58 -07:00
parent 8062bf160f
commit edd61b3b34

View file

@ -214,7 +214,8 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
composing.add_argument( composing.add_argument(
"--template", "--template",
dest="template", dest="template",
help="Path to template file. Can be a local path, absolute path, or a path relative to $XDG_DATA_HOME/jrnl/templates/", help="Path to template file. Can be a local path, absolute path, or a path "
"relative to $XDG_DATA_HOME/jrnl/templates/",
) )
read_msg = ( read_msg = (
@ -265,13 +266,15 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
"-contains", "-contains",
dest="contains", dest="contains",
metavar="TEXT", metavar="TEXT",
help="Show entries containing specific text (put quotes around text with spaces)", help="Show entries containing specific text (put quotes around text with "
"spaces)",
) )
reading.add_argument( reading.add_argument(
"-and", "-and",
dest="strict", dest="strict",
action="store_true", action="store_true",
help='Show only entries that match all conditions, like saying "x AND y" (default: OR)', help='Show only entries that match all conditions, like saying "x AND y" '
"(default: OR)",
) )
reading.add_argument( reading.add_argument(
"-starred", "-starred",
@ -290,7 +293,8 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
dest="limit", dest="limit",
default=None, default=None,
metavar="NUMBER", metavar="NUMBER",
help="Show a maximum of NUMBER entries (note: '-n 3' and '-3' have the same effect)", help="Show a maximum of NUMBER entries (note: '-n 3' and '-3' have the same "
"effect)",
nargs="?", nargs="?",
type=int, type=int,
) )
@ -308,8 +312,12 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
), ),
) )
search_options_msg = """ These help you do various tasks with the selected entries from your search. search_options_msg = (
If used on their own (with no search), they will act on your entire journal""" " " # Preserves indentation
"""
These help you do various tasks with the selected entries from your search.
If used on their own (with no search), they will act on your entire journal"""
)
exporting = parser.add_argument_group( exporting = parser.add_argument_group(
"Searching Options", textwrap.dedent(search_options_msg) "Searching Options", textwrap.dedent(search_options_msg)
) )
@ -360,7 +368,8 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
"--tags", "--tags",
dest="tags", dest="tags",
action="store_true", action="store_true",
help="Alias for '--format tags'. Returns a list of all tags and number of occurrences", help="Alias for '--format tags'. Returns a list of all tags and number of "
"occurrences",
) )
exporting.add_argument( exporting.add_argument(
"--short", "--short",
@ -400,7 +409,7 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
\t jrnl --config-override editor "nano" \n \t jrnl --config-override editor "nano" \n
\t - Override color selections\n \t - Override color selections\n
\t jrnl --config-override colors.body blue --config-override colors.title green \t jrnl --config-override colors.body blue --config-override colors.title green
""", """, # noqa: E501
) )
config_overrides.add_argument( config_overrides.add_argument(
"--co", "--co",
@ -430,7 +439,7 @@ def parse_args(args: list[str] = []) -> argparse.Namespace:
\t jrnl --config-file /home/user1/work_config.yaml \t jrnl --config-file /home/user1/work_config.yaml
\t - Use a personal config file stored on a thumb drive: \n \t - Use a personal config file stored on a thumb drive: \n
\t jrnl --config-file /media/user1/my-thumb-drive/personal_config.yaml \t jrnl --config-file /media/user1/my-thumb-drive/personal_config.yaml
""", """, # noqa E501
) )
alternate_config.add_argument( alternate_config.add_argument(