Skip to content

Commit e982c1f

Browse files
committed
Temporarily allowing bad docstring indentation.
1 parent f934351 commit e982c1f

2 files changed

Lines changed: 88 additions & 88 deletions

File tree

astToolkit/_toolGrab.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -554,26 +554,26 @@ def workhorse(node: hasDOTdecorator_list) -> hasDOTdecorator_list:
554554
def default_valueAttribute(action: Callable[[ | None], | None]) -> Callable[[hasDOTdefault_value], hasDOTdefault_value]:
555555
"""Apply a function to the `default_value` attribute of a 'node' of `type` `hasDOTdefault_value`.
556556
557-
The `type` of the `default_value` attribute is `something` for [any of] `class` `ast.IDK`. If `type` were
558-
represented by a `TypeVar`, I would tell you what the ideogram is. If `default_value` could be a second type, I
559-
would tell you it is `type` `somethingElse` for [any of] `class` `ast.FML`.
557+
The `type` of the `default_value` attribute is `something` for [any of] `class` `ast.IDK`. If `type` were
558+
represented by a `TypeVar`, I would tell you what the ideogram is. If `default_value` could be a second type, I
559+
would tell you it is `type` `somethingElse` for [any of] `class` `ast.FML`.
560560
561-
Parameters
562-
----------
563-
action : Callable[[工 | None], 工 | None]
561+
Parameters
562+
----------
563+
action : Callable[[工 | None], 工 | None]
564564
A function with one parameter and a `return` of the same `type`.
565565
566-
Returns
567-
-------
568-
workhorse : Callable[[hasDOTdefault_value], hasDOTdefault_value]
566+
Returns
567+
-------
568+
workhorse : Callable[[hasDOTdefault_value], hasDOTdefault_value]
569569
A function with one parameter for a 'node' of `type` `hasDOTdefault_value` and a `return` of the same
570570
`type`.
571571
572-
Type Checker Error?
573-
-------------------
574-
If you use `Grab` with one level of complexity, your type checker will give you accurate guidance. With two levels of complexity, such as nesting `Grab`
575-
in another `Grab`, your type checker will be angry. I recommend `typing.cast()`. The fault is mine: the 'type safety' of `Grab` is inherently limited.
576-
"""
572+
Type Checker Error?
573+
-------------------
574+
If you use `Grab` with one level of complexity, your type checker will give you accurate guidance. With two levels of complexity, such as nesting `Grab`
575+
in another `Grab`, your type checker will be angry. I recommend `typing.cast()`. The fault is mine: the 'type safety' of `Grab` is inherently limited.
576+
"""
577577

578578
def workhorse(node: hasDOTdefault_value) -> hasDOTdefault_value:
579579
setattr(node, 'default_value', action(getattr(node, 'default_value')))

astToolkit/_toolMake.py

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,49 +2639,49 @@ def join(cls, expressions: Sequence[ast.expr], **keywordArguments: Unpack[ast_at
26392639
def ParamSpec(name: str, default_value: ast.expr | None=None, **keywordArguments: Unpack[ast_attributes_int]) -> ast.ParamSpec:
26402640
"""Make a parameter specification type parameter for generic callable types.
26412641
2642-
(AI generated docstring.)
2642+
(AI generated docstring.)
26432643
2644-
The `ast.ParamSpec` (***Param***eter ***Spec***ification) object represents parameter specification type
2645-
parameters used in generic callable types. Captures both positional and keyword argument signatures for type-
2646-
safe function composition and higher-order functions.
2644+
The `ast.ParamSpec` (***Param***eter ***Spec***ification) object represents parameter specification type
2645+
parameters used in generic callable types. Captures both positional and keyword argument signatures for type-
2646+
safe function composition and higher-order functions.
26472647
2648-
Parameters
2649-
----------
2650-
name :
2648+
Parameters
2649+
----------
2650+
name :
26512651
Type parameter name as string identifier.
2652-
default_value :
2652+
default_value :
26532653
Optional default type expression (Python 3.13+).
26542654
2655-
Returns
2656-
-------
2657-
parameterSpecification : ast.ParamSpec
2655+
Returns
2656+
-------
2657+
parameterSpecification : ast.ParamSpec
26582658
AST object representing a parameter specification type parameter.
2659-
"""
2659+
"""
26602660
return ast.ParamSpec(name=name, default_value=default_value, **keywordArguments)
26612661
else:
26622662

26632663
@staticmethod
26642664
def ParamSpec(name: str, **keywordArguments: Unpack[ast_attributes_int]) -> ast.ParamSpec:
26652665
"""Make a parameter specification type parameter for generic callable types.
26662666
2667-
(AI generated docstring.)
2667+
(AI generated docstring.)
26682668
2669-
The `ast.ParamSpec` (***Param***eter ***Spec***ification) object represents parameter specification type
2670-
parameters used in generic callable types. Captures both positional and keyword argument signatures for type-
2671-
safe function composition and higher-order functions.
2669+
The `ast.ParamSpec` (***Param***eter ***Spec***ification) object represents parameter specification type
2670+
parameters used in generic callable types. Captures both positional and keyword argument signatures for type-
2671+
safe function composition and higher-order functions.
26722672
2673-
Parameters
2674-
----------
2675-
name :
2673+
Parameters
2674+
----------
2675+
name :
26762676
Type parameter name as string identifier.
2677-
default_value :
2677+
default_value :
26782678
Optional default type expression (Python 3.13+).
26792679
2680-
Returns
2681-
-------
2682-
parameterSpecification : ast.ParamSpec
2680+
Returns
2681+
-------
2682+
parameterSpecification : ast.ParamSpec
26832683
AST object representing a parameter specification type parameter.
2684-
"""
2684+
"""
26852685
return ast.ParamSpec(name=name, **keywordArguments)
26862686

26872687
@staticmethod
@@ -3231,103 +3231,103 @@ def TypeIgnore(lineno: int, tag: str) -> ast.TypeIgnore:
32313231
def TypeVar(name: str, bound: ast.expr | None=None, default_value: ast.expr | None=None, **keywordArguments: Unpack[ast_attributes_int]) -> ast.TypeVar:
32323232
"""Make a type variable parameter for generic types with optional bounds and defaults.
32333233
3234-
(AI generated docstring.)
3234+
(AI generated docstring.)
32353235
3236-
The `ast.TypeVar` (Type ***Var***iable) object represents type variable parameters used in generic classes,
3237-
functions, and type aliases. Supports type bounds, constraints, and default values for flexible generic
3238-
programming.
3236+
The `ast.TypeVar` (Type ***Var***iable) object represents type variable parameters used in generic classes,
3237+
functions, and type aliases. Supports type bounds, constraints, and default values for flexible generic
3238+
programming.
32393239
3240-
Parameters
3241-
----------
3242-
name :
3240+
Parameters
3241+
----------
3242+
name :
32433243
Type variable name as string identifier.
3244-
bound :
3244+
bound :
32453245
Optional type expression constraining allowed types.
3246-
default_value :
3246+
default_value :
32473247
Optional default type expression (Python 3.13+).
32483248
3249-
Returns
3250-
-------
3251-
typeVariable : ast.TypeVar
3249+
Returns
3250+
-------
3251+
typeVariable : ast.TypeVar
32523252
AST object representing a type variable with optional constraints.
3253-
"""
3253+
"""
32543254
return ast.TypeVar(name=name, bound=bound, default_value=default_value, **keywordArguments)
32553255
else:
32563256

32573257
@staticmethod
32583258
def TypeVar(name: str, bound: ast.expr | None=None, **keywordArguments: Unpack[ast_attributes_int]) -> ast.TypeVar:
32593259
"""Make a type variable parameter for generic types with optional bounds and defaults.
32603260
3261-
(AI generated docstring.)
3261+
(AI generated docstring.)
32623262
3263-
The `ast.TypeVar` (Type ***Var***iable) object represents type variable parameters used in generic classes,
3264-
functions, and type aliases. Supports type bounds, constraints, and default values for flexible generic
3265-
programming.
3263+
The `ast.TypeVar` (Type ***Var***iable) object represents type variable parameters used in generic classes,
3264+
functions, and type aliases. Supports type bounds, constraints, and default values for flexible generic
3265+
programming.
32663266
3267-
Parameters
3268-
----------
3269-
name :
3267+
Parameters
3268+
----------
3269+
name :
32703270
Type variable name as string identifier.
3271-
bound :
3271+
bound :
32723272
Optional type expression constraining allowed types.
3273-
default_value :
3273+
default_value :
32743274
Optional default type expression (Python 3.13+).
32753275
3276-
Returns
3277-
-------
3278-
typeVariable : ast.TypeVar
3276+
Returns
3277+
-------
3278+
typeVariable : ast.TypeVar
32793279
AST object representing a type variable with optional constraints.
3280-
"""
3280+
"""
32813281
return ast.TypeVar(name=name, bound=bound, **keywordArguments)
32823282
if sys.version_info >= (3, 13):
32833283

32843284
@staticmethod
32853285
def TypeVarTuple(name: str, default_value: ast.expr | None=None, **keywordArguments: Unpack[ast_attributes_int]) -> ast.TypeVarTuple:
32863286
"""Make a type variable tuple for variadic generic types.
32873287
3288-
(AI generated docstring.)
3288+
(AI generated docstring.)
32893289
3290-
The `ast.TypeVarTuple` (Type ***Var***iable ***Tuple***) object represents type variable tuples used for
3291-
variadic generic types that accept variable numbers of type arguments. Enables generic types that work with
3292-
arbitrary-length type sequences.
3290+
The `ast.TypeVarTuple` (Type ***Var***iable ***Tuple***) object represents type variable tuples used for
3291+
variadic generic types that accept variable numbers of type arguments. Enables generic types that work with
3292+
arbitrary-length type sequences.
32933293
3294-
Parameters
3295-
----------
3296-
name :
3294+
Parameters
3295+
----------
3296+
name :
32973297
Type variable tuple name as string identifier.
3298-
default_value :
3298+
default_value :
32993299
Optional default type tuple expression (Python 3.13+).
33003300
3301-
Returns
3302-
-------
3303-
typeVariableTuple : ast.TypeVarTuple
3301+
Returns
3302+
-------
3303+
typeVariableTuple : ast.TypeVarTuple
33043304
AST object representing a variadic type variable.
3305-
"""
3305+
"""
33063306
return ast.TypeVarTuple(name=name, default_value=default_value, **keywordArguments)
33073307
else:
33083308

33093309
@staticmethod
33103310
def TypeVarTuple(name: str, **keywordArguments: Unpack[ast_attributes_int]) -> ast.TypeVarTuple:
33113311
"""Make a type variable tuple for variadic generic types.
33123312
3313-
(AI generated docstring.)
3313+
(AI generated docstring.)
33143314
3315-
The `ast.TypeVarTuple` (Type ***Var***iable ***Tuple***) object represents type variable tuples used for
3316-
variadic generic types that accept variable numbers of type arguments. Enables generic types that work with
3317-
arbitrary-length type sequences.
3315+
The `ast.TypeVarTuple` (Type ***Var***iable ***Tuple***) object represents type variable tuples used for
3316+
variadic generic types that accept variable numbers of type arguments. Enables generic types that work with
3317+
arbitrary-length type sequences.
33183318
3319-
Parameters
3320-
----------
3321-
name :
3319+
Parameters
3320+
----------
3321+
name :
33223322
Type variable tuple name as string identifier.
3323-
default_value :
3323+
default_value :
33243324
Optional default type tuple expression (Python 3.13+).
33253325
3326-
Returns
3327-
-------
3328-
typeVariableTuple : ast.TypeVarTuple
3326+
Returns
3327+
-------
3328+
typeVariableTuple : ast.TypeVarTuple
33293329
AST object representing a variadic type variable.
3330-
"""
3330+
"""
33313331
return ast.TypeVarTuple(name=name, **keywordArguments)
33323332

33333333
@staticmethod

0 commit comments

Comments
 (0)