Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion stubs/reportlab/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "4.4.4"
version = "4.4.5"
# GitHub mirror of https://hg.reportlab.com/hg-public/reportlab/file
upstream_repository = "https://github.com/MrBitBucket/reportlab-mirror"

Expand Down
52 changes: 27 additions & 25 deletions stubs/reportlab/reportlab/lib/testutils.pyi
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
import re
import unittest
from _typeshed import Incomplete
from configparser import ConfigParser
from _typeshed import Incomplete, StrPath, Unused
from configparser import ConfigParser, _SectionName
from types import ModuleType
from typing import Final, Literal

__version__: Final[str]

def haveRenderPM(): ...
def isWritable(D): ...
def invariantSeed(n: float | str | bytes | bytearray | None) -> None: ...
def haveRenderPM() -> ModuleType | Literal[False]: ...

RL_HOME: Incomplete
testsFolder: Incomplete

DEJAVUSANS: tuple[
Literal["DejaVuSans"], Literal["DejaVuSans-Bold"], Literal["DejaVuSans-Oblique"], Literal["DejaVuSans-BoldOblique"]
] = ...
DEJAVUSANS: Final = ("DejaVuSans", "DejaVuSans-Bold", "DejaVuSans-Oblique", "DejaVuSans-BoldOblique")

def haveDejaVu() -> bool: ...
def setOutDir(name): ...
def mockUrlRead(name): ...
def outputfile(fn): ...
def isWritable(D: Unused) -> Literal[0, 1]: ...

RL_HOME: str | None
testsFolder: str | None

def setOutDir(name: str) -> str: ...
def mockUrlRead(name: str): ...
def outputfile(fn: StrPath | None) -> str: ...
def printLocation(depth: int = 1) -> None: ...
def makeSuiteForClasses(*classes, testMethodPrefix=None): ...
def getCVSEntries(folder, files: int = 1, folders: int = 0): ...
def makeSuiteForClasses(*classes: type[unittest.TestCase], testMethodPrefix: str | None = None) -> unittest.TestSuite: ...
def getCVSEntries(folder: StrPath, files: bool | Literal[1, 0] = 1, folders: bool | Literal[1, 0] = 0) -> list[str]: ...

class ExtConfigParser(ConfigParser):
pat: Incomplete
def getstringlist(self, section, option): ...
pat: re.Pattern[str]
def getstringlist(self, section: _SectionName, option: str): ...

class GlobDirectoryWalker:
index: int
pattern: Incomplete
stack: Incomplete
files: Incomplete
directory: Incomplete
def __init__(self, directory, pattern: str = "*") -> None: ...
def __getitem__(self, index): ...
pattern: str
stack: list[str]
files: list[str]
directory: str
def __init__(self, directory: str, pattern: str = "*") -> None: ...
def __getitem__(self, index) -> str | None: ...
def filterFiles(self, folder, files): ...

class RestrictedGlobDirectoryWalker(GlobDirectoryWalker):
Expand Down Expand Up @@ -64,9 +66,9 @@ class ScriptThatMakesFileTest(unittest.TestCase):
def tearDown(self) -> None: ...
def runTest(self) -> None: ...

def equalStrings(a, b, enc: str = "utf8"): ...
def equalStrings(a: str | bytes, b: str | bytes, enc: str = "utf8") -> bool: ...
def eqCheck(r, x) -> None: ...
def rlextraNeeded(): ...
def rlextraNeeded() -> bool: ...
def rlSkipIf(cond, reason, __module__=None): ...
def rlSkipUnless(cond, reason, __module__=None): ...
def rlSkip(reason, __module__=None): ...
2 changes: 1 addition & 1 deletion stubs/reportlab/reportlab/platypus/flowables.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class ListItem:
# TODO: Use Unpack for kwds with the ListStyle properties + value/spaceBefore/spaceAfter
def __init__(self, flowables: _FlowableSublist, style: PropertySet | None = None, **kwds) -> None: ...

class ListFlowable(_Container, Flowable):
class ListFlowable(_Container, Flowable, _FindSplitterMixin):
style: ListStyle
# NOTE: style has to be a ListStyle, but this will be annoying with sheet["ul"]
# TODO: Use Unpack for kwds with the ListStyle properties + spaceBefore/spaceAfter
Expand Down