Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve docutils.utils #14122

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 5 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
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
Fix errors
  • Loading branch information
donBarbos committed May 22, 2025
commit 65d8269acfbffbe5dc563c173f536e03edbbb4e4
39 changes: 17 additions & 22 deletions 39 stubs/docutils/docutils/utils/math/math2html.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class FormulaParser(Parser):
def parsemultiliner(self, reader, start, ending): ...

class FormulaBit(Container):
type: Incomplete
type: str | None
size: int
original: str
contents: Incomplete
Expand All @@ -303,14 +303,13 @@ class TaggedBit(FormulaBit):
class FormulaConstant(Constant):
original: Incomplete
size: int
type: Incomplete
type: str | None
def __init__(self, string) -> None: ...
def computesize(self): ...
def clone(self): ...

class RawText(FormulaBit):
def detect(self, pos): ...
type: str
def parsebit(self, pos) -> None: ...

class FormulaSymbol(FormulaBit):
Expand All @@ -322,7 +321,6 @@ class FormulaSymbol(FormulaBit):

class FormulaNumber(FormulaBit):
def detect(self, pos): ...
type: str
def parsebit(self, pos): ...

class Comment(FormulaBit):
Expand Down Expand Up @@ -405,7 +403,7 @@ class FormulaFactory:
class FormulaCommand(FormulaBit):
types: Incomplete
start: Incomplete
commandmap: Incomplete
commandmap: ClassVar[dict[str, str] | dict[str, list[str]] | None]
def detect(self, pos): ...
output: Incomplete
def parsebit(self, pos): ...
Expand All @@ -426,45 +424,42 @@ class CommandBit(FormulaCommand):
def parsetext(self, pos): ...

class EmptyCommand(CommandBit):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
contents: Incomplete
def parsebit(self, pos) -> None: ...

class SpacedCommand(CommandBit):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
contents: Incomplete
def parsebit(self, pos) -> None: ...

class AlphaCommand(EmptyCommand):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
greek_capitals: Incomplete
type: str
def parsebit(self, pos) -> None: ...

class OneParamFunction(CommandBit):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
simplified: bool
output: Incomplete
def parsebit(self, pos) -> None: ...
html: Incomplete
def simplifyifpossible(self) -> None: ...

class SymbolFunction(CommandBit):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
def detect(self, pos): ...
output: Incomplete
def parsebit(self, pos) -> None: ...

class TextFunction(CommandBit):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
output: Incomplete
def parsebit(self, pos) -> None: ...
type: str
def process(self) -> None: ...

class FontFunction(OneParamFunction):
commandmap: Incomplete
type: str
commandmap: ClassVar[dict[str, str]]
def process(self) -> None: ...

class BigBracket:
Expand Down Expand Up @@ -536,38 +531,38 @@ class EquationEnvironment(MultiRowFormula):
def parsebit(self, pos) -> None: ...

class BeginCommand(CommandBit):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
types: Incomplete
size: Incomplete
def parsebit(self, pos) -> None: ...
def findbit(self, piece): ...

class CombiningFunction(OneParamFunction):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
def parsebit(self, pos) -> None: ...
def parsesingleparameter(self, pos): ...

class OversetFunction(OneParamFunction):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
symbol: Incomplete
parameter: Incomplete
output: Incomplete
def parsebit(self, pos) -> None: ...

class UndersetFunction(OneParamFunction):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
symbol: Incomplete
parameter: Incomplete
output: Incomplete
def parsebit(self, pos) -> None: ...

class LimitCommand(EmptyCommand):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
output: Incomplete
def parsebit(self, pos) -> None: ...

class LimitPreviousCommand(LimitCommand):
commandmap: Incomplete
commandmap: ClassVar[None] # type: ignore[assignment]
output: Incomplete
def parsebit(self, pos) -> None: ...

Expand All @@ -583,7 +578,7 @@ class LimitsProcessor(MathsProcessor):
def getscript(self, contents, index): ...

class BracketCommand(OneParamFunction):
commandmap: Incomplete
commandmap: ClassVar[dict[str, str]]
def parsebit(self, pos) -> None: ...
original: Incomplete
command: Incomplete
Expand Down
16 changes: 8 additions & 8 deletions 16 stubs/docutils/docutils/utils/math/mathml_elements.pyi
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import numbers
import xml.etree.ElementTree as ET
from collections.abc import Iterable
from typing import Any, ClassVar, Final, SupportsIndex, overload
from typing import ClassVar, Final, SupportsIndex, overload
from typing_extensions import Self

GLOBAL_ATTRIBUTES: Final[tuple[str, ...]]

class MathElement(ET.Element):
nchildren: ClassVar[int | None]
parent: MathElement | None
def __init__(self, *children, **attributes: object) -> None: ... # attributes passing to self.a_str method
def __init__(self, *children, **attributes: object) -> None: ... # attributes is passed to self.a_str method
@staticmethod
def a_str(v: object) -> str: ...
def set(self, key: SupportsIndex, value: object) -> None: ... # value passing to self.a_str method
@overload
def set(self, key: str, value: object) -> None: ... # value is passed to self.a_str method
@overload # type: ignore[override]
def __setitem__(self, key: SupportsIndex, value: MathElement) -> None: ...
@overload
def __setitem__(self, key: slice[Any, Any, Any], value: Iterable[MathElement]) -> None: ...
@overload # type: ignore[override]
def __setitem__(self, key: slice, value: Iterable[MathElement]) -> None: ...
def is_full(self) -> bool: ...
def close(self) -> MathElement | None: ...
def append(self, element: MathElement) -> Self: ...
def extend(self, elements: Iterable[MathElement]) -> Self: ...
def append(self, element: MathElement) -> Self: ... # type: ignore[override]
def extend(self, elements: Iterable[MathElement]) -> Self: ... # type: ignore[override]
def pop(self, index: int = -1): ...
def in_block(self) -> bool: ...
def indent_xml(self, space: str = " ", level: int = 0) -> None: ...
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.