mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
docutils: Use ClassVar for Directive class variables (#11550)
These are intended to be set as class variables, in subclasses of Directive, rather than instance variables. See also: - https://docutils.sourceforge.io/docs/howto/rst-directives.html#the-directive-class - https://docutils.sourceforge.io/docs/howto/rst-directives.html#admonitions
This commit is contained in:
@@ -24,11 +24,11 @@ class DirectiveError(Exception):
|
||||
def __init__(self, level: int, message: str) -> None: ...
|
||||
|
||||
class Directive:
|
||||
required_arguments: int
|
||||
optional_arguments: int
|
||||
final_argument_whitespace: bool
|
||||
option_spec: dict[str, Callable[[str], Any]] | None
|
||||
has_content: bool
|
||||
required_arguments: ClassVar[int]
|
||||
optional_arguments: ClassVar[int]
|
||||
final_argument_whitespace: ClassVar[bool]
|
||||
option_spec: ClassVar[dict[str, Callable[[str], Any]] | None]
|
||||
has_content: ClassVar[bool]
|
||||
name: str
|
||||
arguments: list[str]
|
||||
options: dict[str, Any]
|
||||
|
||||
Reference in New Issue
Block a user