8000 gh-106970: Fix Argument Clinic 'destination <name> clear' command by erlend-aasland · Pull Request #106972 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106970: Fix Argument Clinic 'destination <name> clear' command #106972

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

Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Modernise 'destination' directive
  • Loading branch information
erlend-aasland committed Jul 21, 2023
commit 0859b197f1e0be2d38c761dfe0cc7a2378770a7d
15 changes: 7 additions & 8 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4487,14 +4487,13 @@ def directive_destination(
command: str,
*args
) -> None:
if command == 'new':
self.clinic.add_destination(name, *args)
return

if command == 'clear':
self.clinic.get_destination(name).clear()
return
fail("unknown destination command", repr(command))
match command:
case "new":
self.clinic.add_destination(name, *args)
case "clear":
self.clinic.get_destination(name).clear()
case _:
fail("unknown destination command", repr(command))


def directive_output(
Expand Down
0