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
17 changes: 9 additions & 8 deletions stubs/reportlab/reportlab/lib/PyFontify.pyi
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import re
from _typeshed import Incomplete
from typing import Final

__version__: Final[str]

def replace(src, sep, rep): ...

keywordsList: Incomplete
keywordsList: list[str]
commentPat: str
pat: str
quotePat: Incomplete
tripleQuotePat: Incomplete
quotePat: str
tripleQuotePat: str
nonKeyPat: str
keyPat: Incomplete
matchPat: Incomplete
matchRE: Incomplete
keyPat: str
matchPat: str
matchRE: re.Pattern[str]
idKeyPat: str
idRE: Incomplete
idRE: re.Pattern[str]

def fontify(pytext, searchfrom: int = 0, searchto=None): ...
def fontify(pytext, searchfrom: int = 0, searchto=None) -> list[tuple[str, int, int, Incomplete]]: ...
def test(path) -> None: ...
6 changes: 3 additions & 3 deletions stubs/reportlab/reportlab/lib/arciv.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class ArcIV:
def __init__(self, key) -> None: ...
def reset(self) -> None: ...
def encode(self, S): ...
def encode(self, S: str | bytes | list[int]) -> bytes: ...

def encode(text, key): ...
def decode(text, key): ...
def encode(text: str | bytes | list[int], key) -> bytes: ...
def decode(text: str | bytes | list[int], key) -> bytes: ...

__all__ = ["ArcIV", "encode", "decode"]
4 changes: 2 additions & 2 deletions stubs/reportlab/reportlab/lib/attrmap.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class AttrMapValue:
class AttrMap(dict[str, AttrMapValue]):
def __init__(self, BASE=None, UNWANTED=[], **kw) -> None: ...
def remove(self, unwanted) -> None: ...
def clone(self, UNWANTED=[], **kw): ...
def clone(self, UNWANTED=[], **kw) -> AttrMap: ...

def validateSetattr(obj, name, value) -> None: ...
def hook__setattr__(obj): ...
def hook__setattr__(obj) -> None: ...
def addProxyAttribute(src, name, validate=None, desc=None, initial=None, dst=None) -> None: ...
14 changes: 11 additions & 3 deletions stubs/reportlab/reportlab/lib/boxstuff.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
from typing import Final
from _typeshed import Incomplete
from typing import Final, Literal, overload

__version__: Final[str]

def rectCorner(x, y, width, height, anchor: str = "sw", dims: bool = False): ...
def aspectRatioFix(preserve, anchor, x, y, width, height, imWidth, imHeight, anchorAtXY: bool = False): ...
@overload
def rectCorner(
x, y, width, height, anchor: str = "sw", dims: Literal[True] = ...
) -> tuple[Incomplete, Incomplete, Incomplete, Incomplete]: ...
@overload
def rectCorner(x, y, width, height, anchor: str = "sw", dims: Literal[False] | None = False) -> tuple[Incomplete, Incomplete]: ...
def aspectRatioFix(
preserve, anchor, x, y, width, height, imWidth, imHeight, anchorAtXY: bool = False
) -> tuple[Incomplete, Incomplete, Incomplete, Incomplete, Incomplete]: ...
13 changes: 7 additions & 6 deletions stubs/reportlab/reportlab/lib/codecharts.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from _typeshed import Incomplete
from typing import Final

from reportlab.graphics.shapes import Group
from reportlab.graphics.widgetbase import Widget
from reportlab.platypus import Flowable

__version__: Final[str]
adobe2codec: Incomplete
adobe2codec: dict[str, str]

class CodeChartBase(Flowable):
rows: Incomplete
Expand All @@ -14,7 +15,7 @@ class CodeChartBase(Flowable):
ylist: Incomplete
xlist: Incomplete
def calcLayout(self) -> None: ...
def formatByte(self, byt): ...
def formatByte(self, byt) -> str: ...
def drawChars(self, charList) -> None: ...
def drawLabels(self, topLeft: str = "") -> None: ...

Expand All @@ -35,7 +36,7 @@ class SingleByteEncodingChart(CodeChartBase):
boxSize: int = 14,
hex: int = 1,
) -> None: ...
def draw(self): ...
def draw(self) -> None: ...

class KutenRowCodeChart(CodeChartBase):
row: Incomplete
Expand All @@ -49,7 +50,7 @@ class KutenRowCodeChart(CodeChartBase):
encodingName: Incomplete
fontName: Incomplete
def __init__(self, row, faceName, encodingName) -> None: ...
def makeRow(self, row): ...
def makeRow(self, row) -> list[bytes | list[None]]: ...
def draw(self) -> None: ...

class Big5CodeChart(CodeChartBase):
Expand All @@ -64,7 +65,7 @@ class Big5CodeChart(CodeChartBase):
rowLabels: Incomplete
fontName: Incomplete
def __init__(self, row, faceName, encodingName) -> None: ...
def makeRow(self, row): ...
def makeRow(self, row) -> list[bytes | list[None]]: ...
def draw(self) -> None: ...

def hBoxText(msg, canvas, x, y, fontName) -> None: ...
Expand All @@ -75,6 +76,6 @@ class CodeWidget(Widget):
width: int
height: int
def __init__(self) -> None: ...
def draw(self): ...
def draw(self) -> Group: ...

def test() -> None: ...
16 changes: 9 additions & 7 deletions stubs/reportlab/reportlab/lib/corp.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from collections.abc import Iterable
from typing import Final

from reportlab.graphics.shapes import Drawing, Group
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
Expand All @@ -24,10 +26,10 @@ class RL_CorpLogo(Widget):
pageColors: Incomplete
prec: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def demo(self) -> Drawing: ...
@staticmethod
def applyPrec(P, prec): ...
def draw(self): ...
def draw(self) -> Group: ...

class RL_CorpLogoReversed(RL_CorpLogo):
background: Incomplete
Expand All @@ -42,8 +44,8 @@ class RL_CorpLogoThin(Widget):
height: Incomplete
width: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def draw(self): ...
def demo(self) -> Drawing: ...
def draw(self) -> Group: ...

class ReportLabLogo:
origin: Incomplete
Expand Down Expand Up @@ -73,7 +75,7 @@ class RL_BusinessCard(Widget):
web: str
rh_blurb_top: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def draw(self): ...
def demo(self) -> Drawing: ...
def draw(self) -> Group: ...

def test(formats=["pdf", "eps", "jpg", "gif", "svg"]) -> None: ...
def test(formats: Iterable[str] = ["pdf", "eps", "jpg", "gif", "svg"]) -> None: ...
9 changes: 6 additions & 3 deletions stubs/reportlab/reportlab/lib/extformat.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from typing import Final
from collections.abc import Mapping
from typing import Any, Final

__version__: Final[str]

def dictformat(_format, L={}, G={}): ...
def magicformat(format): ...
def dictformat(
_format: str, L: Mapping[str, object] | None = {}, G: dict[str, Any] | None = {} # `L` and `G` are passed to `eval` function
) -> str: ...
def magicformat(format: str) -> str: ...
33 changes: 17 additions & 16 deletions stubs/reportlab/reportlab/lib/fontfinder.pyi
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
from _typeshed import Incomplete
from typing import Final
from typing_extensions import LiteralString

__version__: Final[str]

def asNative(s): ...
def asNative(s) -> str: ...

EXTENSIONS: Incomplete
FF_FIXED: Incomplete
FF_SERIF: Incomplete
FF_SYMBOLIC: Incomplete
FF_SCRIPT: Incomplete
FF_NONSYMBOLIC: Incomplete
FF_ITALIC: Incomplete
FF_ALLCAP: Incomplete
FF_SMALLCAP: Incomplete
FF_FORCEBOLD: Incomplete
EXTENSIONS: Final = [".ttf", ".ttc", ".otf", ".pfb", ".pfa"]
FF_FIXED: Final = 1
FF_SERIF: Final = 2
FF_SYMBOLIC: Final = 4
FF_SCRIPT: Final = 8
FF_NONSYMBOLIC: Final = 32
FF_ITALIC: Final = 64
FF_ALLCAP: Final = 65536
FF_SMALLCAP: Final = 131072
FF_FORCEBOLD: Final = 262144

class FontDescriptor:
name: Incomplete
Expand All @@ -30,7 +31,7 @@ class FontDescriptor:
metricsFileName: Incomplete
timeModified: int
def __init__(self) -> None: ...
def getTag(self): ...
def getTag(self) -> LiteralString: ...

class FontFinder:
useCache: Incomplete
Expand All @@ -41,11 +42,11 @@ class FontFinder:
) -> None: ...
def addDirectory(self, dirName, recur=None) -> None: ...
def addDirectories(self, dirNames, recur=None) -> None: ...
def getFamilyNames(self): ...
def getFamilyNames(self) -> list[bytes]: ...
def getFontsInFamily(self, familyName): ...
def getFamilyXmlReport(self): ...
def getFontsWithAttributes(self, **kwds): ...
def getFont(self, familyName, bold: bool = False, italic: bool = False): ...
def getFamilyXmlReport(self) -> LiteralString: ...
def getFontsWithAttributes(self, **kwds) -> list[FontDescriptor]: ...
def getFont(self, familyName, bold: bool = False, italic: bool = False) -> FontDescriptor: ...
def save(self, fileName) -> None: ...
def load(self, fileName) -> None: ...
def search(self) -> None: ...
Expand Down
18 changes: 11 additions & 7 deletions stubs/reportlab/reportlab/lib/formatters.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
from _typeshed import Incomplete
from typing import Literal
from typing_extensions import LiteralString

class Formatter:
pattern: Incomplete
def __init__(self, pattern) -> None: ...
def format(self, obj): ...
def __call__(self, x): ...
pattern: str
def __init__(self, pattern: str) -> None: ...
def format(self, obj: object) -> str: ...
def __call__(self, x: object) -> str: ...

class DecimalFormatter(Formatter):
calcPlaces: Incomplete
places: Incomplete
places: int
dot: Incomplete
comma: Incomplete
prefix: Incomplete
suffix: Incomplete
def __init__(self, places: int = 2, decimalSep: str = ".", thousandSep=None, prefix=None, suffix=None) -> None: ...
def format(self, num): ...
def __init__(
self, places: int | Literal["auto"] = 2, decimalSep: str = ".", thousandSep=None, prefix=None, suffix=None
) -> None: ...
def format(self, num) -> LiteralString: ...

__all__ = ("Formatter", "DecimalFormatter")
2 changes: 1 addition & 1 deletion stubs/reportlab/reportlab/lib/geomutils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ from typing import Final

__version__: Final[str]

def normalizeTRBL(p): ...
def normalizeTRBL(p: float | tuple[float, ...] | list[float]) -> tuple[float, ...]: ...
12 changes: 6 additions & 6 deletions stubs/reportlab/reportlab/lib/logger.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class Logger:
def write(self, text) -> None: ...
def __call__(self, text) -> None: ...

logger: Incomplete
logger: Logger

class WarnOnce:
uttered: Incomplete
pfx: Incomplete
enabled: int
uttered: dict[Incomplete, Incomplete]
pfx: str
enabled: bool | int
def __init__(self, kind: str = "Warn") -> None: ...
def once(self, warning) -> None: ...
def __call__(self, warning) -> None: ...

warnOnce: Incomplete
infoOnce: Incomplete
warnOnce: WarnOnce
infoOnce: WarnOnce
Loading