Accept position arguments, I'm tired of forgetting -p #27

Merged
mdk merged 2 commits from mdk/potodo:mdk-p into main 2025-10-24 17:06:03 +02:00
Owner

Hum oops I have a totally unrelated change, simplifying an if not any.

Hum oops I have a totally unrelated change, simplifying an `if not any`.
Accept position arguments, I'm tired of forgetting -p
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2ffb148059
maciek approved these changes 2025-10-23 21:54:00 +02:00
maciek left a comment

Looks good to me, left some nitty suggestions

It's very nice simplification of the API 💯

Looks good to me, left some nitty suggestions It's very nice simplification of the API 💯
@ -22,2 +22,4 @@
def handle_dash_p_compat(args: argparse.Namespace) -> None:
"""Could be remonved in like 2028.
Contributor

nit: remonved -> removed

nit: remonved -> removed
mdk marked this conversation as resolved
@ -24,0 +34,4 @@
"🍰 hint: using -p to invoke potodo became optional in potodo 0.3.",
file=sys.stderr,
)
print(" (and may be removed in the future)", file=sys.stderr)
Contributor

nit suggestion: make those a one print with \n at the end of the first line

nit suggestion: make those a one print with `\n` at the end of the first line
mdk marked this conversation as resolved
@ -38,0 +56,4 @@
parser.add_argument(
"paths",
help="Examine files in the given path",
Contributor

Examine files in the given path -> Examine files in given path(s)

Examine files in the given path -> Examine files in given path(s)
mdk marked this conversation as resolved
@ -239,3 +264,3 @@
# If no path is specified, use current directory
if not args.paths:
if not args.paths and not args.old_paths:
Contributor

superfluous: we call handle_dash_p_compat before check_args

superfluous: we call `handle_dash_p_compat` before `check_args`
Author
Owner

Adding a del args.old_paths in handle_dash_p_compat.

Adding a `del args.old_paths` in `handle_dash_p_compat`.
mdk marked this conversation as resolved
Review by maciek
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
1480737776
mdk merged commit 9dc0a0025d into main 2025-10-24 17:06:03 +02:00
mdk deleted branch mdk-p 2025-10-24 17:06:04 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AFPy/potodo!27
No description provided.