Skip to content

Commit 69d7ade

Browse files
AlexWaygoodpull[bot]
authored andcommitted
gh-104050: Argument Clinic: Annotate CRenderData.__init__ (#107207)
Argument Clinic: Annotate `CRenderData.__init__`
1 parent 9f0bdb1 commit 69d7ade

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Tools/clinic/clinic.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -372,36 +372,36 @@ def version_comparitor(version1: str, version2: str) -> Literal[-1, 0, 1]:
372372

373373

374374
class CRenderData:
375-
def __init__(self):
375+
def __init__(self) -> None:
376376

377377
# The C statements to declare variables.
378378
# Should be full lines with \n eol characters.
379-
self.declarations = []
379+
self.declarations: list[str] = []
380380

381381
# The C statements required to initialize the variables before the parse call.
382382
# Should be full lines with \n eol characters.
383-
self.initializers = []
383+
self.initializers: list[str] = []
384384

385385
# The C statements needed to dynamically modify the values
386386
# parsed by the parse call, before calling the impl.
387-
self.modifications = []
387+
self.modifications: list[str] = []
388388

389389
# The entries for the "keywords" array for PyArg_ParseTuple.
390390
# Should be individual strings representing the names.
391-
self.keywords = []
391+
self.keywords: list[str] = []
392392

393393
# The "format units" for PyArg_ParseTuple.
394394
# Should be individual strings that will get
395-
self.format_units = []
395+
self.format_units: list[str] = []
396396

397397
# The varargs arguments for PyArg_ParseTuple.
398-
self.parse_arguments = []
398+
self.parse_arguments: list[str] = []
399399

400400
# The parameter declarations for the impl function.
401-
self.impl_parameters = []
401+
self.impl_parameters: list[str] = []
402402

403403
# The arguments to the impl function at the time it's called.
404-
self.impl_arguments = []
404+
self.impl_arguments: list[str] = []
405405

406406
# For return converters: the name of the variable that
407407
# should receive the value returned by the impl.
@@ -411,17 +411,17 @@ def __init__(self):
411411
# value from the parse function. This is also where
412412
# you should check the _return_value for errors, and
413413
# "goto exit" if there are any.
414-
self.return_conversion = []
414+
self.return_conversion: list[str] = []
415415
self.converter_retval = "_return_value"
416416

417417
# The C statements required to do some operations
418418
# after the end of parsing but before cleaning up.
419419
# These operations may be, for example, memory deallocations which
420420
# can only be done without any error happening during argument parsing.
421-
self.post_parsing = []
421+
self.post_parsing: list[str] = []
422422

423423
# The C statements required to clean up after the impl call.
424-
self.cleanup = []
424+
self.cleanup: list[str] = []
425425

426426

427427
class FormatCounterFormatter(string.Formatter):

0 commit comments

Comments
 (0)