8000 gh-104050: Add basic type hints to Argument Clinic clinic class by erlend-aasland · Pull Request #104705 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104050: Add basic type hints to Argument Clinic clinic class #104705

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
merged 4 commits into from
May 21, 2023
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
Clinic only accepts CLanguage
  • Loading branch information
erlend-aasland committed May 21, 2023
commit f84c3d312534f62471fec280770cddb63c2cb4d7
5 changes: 3 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ class Clinic:

def __init__(
self,
language: Language,
language: CLanguage,
printer: BlockPrinter | None = None,
*,
verify: bool = True,
Expand All @@ -2060,7 +2060,7 @@ def __init__(
# maps strings to Parser objects.
# (instantiated from the "parsers" global.)
self.parsers: ParserDict = {}
self.language: Language = language
self.language: CLanguage = language
if printer:
fail("Custom printers are broken right now")
self.printer = printer or BlockPrinter(language)
Expand Down Expand Up @@ -2273,6 +2273,7 @@ def parse_file(
if not find_start_re.search(raw):
return

assert isinstance(language, CLanguage)
clinic = Clinic(language, verify=verify, filename=filename)
src_out, clinic_out = clinic.parse(raw)

Expand Down
0