Adds stubs for reportlab (#12013)

This commit is contained in:
David Salvisberg
2024-05-24 19:05:26 +02:00
committed by GitHub
parent ac6c61ba04
commit 1781cde60a
135 changed files with 8969 additions and 0 deletions

View File

@@ -87,6 +87,7 @@
"stubs/PyYAML",
"stubs/qrcode",
"stubs/redis",
"stubs/reportlab",
"stubs/requests",
"stubs/requests-oauthlib",
"stubs/seaborn",

View File

@@ -0,0 +1,120 @@
# Error: is inconsistent
# ======================
# The drawOn method violates LSP all over the place and it's usually
# optional parameters that only exist in a base class and some of them
# are internal only like _sW, so we've decided to omit these, in order
# to get less noise from derived classes that don't have these parameters
reportlab\.platypus\.(doctemplate\.|flowables\.)?[A-Za-z_]+\.drawOn
# similary the wrap/split methods use inconsistent names for their
# parameters, so we decided to make them positional-only
reportlab\.platypus\.(doctemplate\.|flowables\.|tableofcontents\.)?[A-Za-z_]+\.split
reportlab\.platypus\.(doctemplate\.|flowables\.|tableofcontents\.)?[A-Za-z_]+\.wrap
reportlab.platypus.multicol.MultiCol.split
reportlab.platypus.multicol.MultiCol.wrap
reportlab.platypus.para.FastPara.split
reportlab.platypus.para.FastPara.wrap
reportlab.platypus.para.Para.split
reportlab.platypus.para.Para.wrap
reportlab.platypus.paragraph.Paragraph.split
reportlab.platypus.paragraph.Paragraph.wrap
reportlab.platypus.tables.Table.split
reportlab.platypus.tables.Table.wrap
# these have an optional extra argument which isn't consistently used
# among subclasses, so we pretend it doesn't exist for now
reportlab.platypus.flowables._ContainerSpace.getSpaceAfter
reportlab.platypus.flowables._ContainerSpace.getSpaceBefore
# this has an internal __boundary__ argument which confuses stubtest
# we've decided to just get rid of the argument in the stub entirely
reportlab.platypus.Frame.drawBoundary
reportlab.platypus.frames.Frame.drawBoundary
# this is just a case-insenstive version of dict and changes in parameter
# names and them changing from positional-only to keyword or positional
# is entirely untintentional, for simplicity we assume these methods
# work the same as in the base class, there is only one exception
# where the signature actually is more restrictive in CIDict
reportlab.lib.utils.CIDict.get
reportlab.lib.utils.CIDict.pop
reportlab.lib.utils.CIDict.setdefault
# these have a __module__ argument which confuses stubtest
reportlab.lib.testutils.rlSkip
reportlab.lib.testutils.rlSkipIf
reportlab.lib.testutils.rlSkipUnless
# __map__ argument confuses stubtest
reportlab.lib.styles.str2alignment
# __new__ just forwards the arguments to the super class
# it doesn't actually accept arbitrary arguments
reportlab.platypus.doctemplate.PTCycle.__new__
# type[Canvas] is a _CanvasMaker, for some reason stubtest trips up
reportlab.platypus.BaseDocTemplate.build
reportlab.platypus.SimpleDocTemplate.build
reportlab.platypus.doctemplate.BaseDocTemplate.build
reportlab.platypus.doctemplate.SimpleDocTemplate.build
reportlab.platypus.tableofcontents.SimpleIndex.getCanvasMaker
# Error: not present in stub
# ==========================
# loop variables that weren't cleaned up
reportlab.lib.fonts.v
reportlab.graphics.barcode.code93.k
reportlab.graphics.barcode.code93.v
reportlab.graphics.barcode.qrencoder.i
reportlab.lib.fonts.k
reportlab.lib.pdfencrypt.i
# *-imports that cause a mess we don't want to propagate
reportlab.graphics.charts.lineplots.pi
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.EVEN_ODD
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.FILL_EVEN_ODD
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.FILL_NON_ZERO
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.NON_ZERO_WINDING
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.STATE_DEFAULTS
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.decimalSymbol
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.pi
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.shapeChecking
reportlab\.graphics\.render(base|PDF|PM|PS|SVG)\.verbose
# messed up __all__ which contains just a string
reportlab.graphics.barcode.qr.C
reportlab.graphics.barcode.qr.Q
reportlab.graphics.barcode.qr.W
reportlab.graphics.barcode.qr.__all__
reportlab.graphics.barcode.qr.d
reportlab.graphics.barcode.qr.e
reportlab.graphics.barcode.qr.g
reportlab.graphics.barcode.qr.i
reportlab.graphics.barcode.qr.o
reportlab.graphics.barcode.qr.r
reportlab.graphics.barcode.qr.t
# spelling mistake in __all__
reportlab.graphics.barcode.ecc200datamatrix.ECC200datamatrix
# wasn't removed from __all__ by accident
reportlab.graphics.barcode.eanbc.isEanString
# Error: is not present at runtime
# ================================
# These can have arbitrary attributes, so we add a __getattr__
reportlab.lib.abag.ABag.__getattr__
reportlab.lib.styles.PropertySet.__getattr__
# Only exists on renderPM backend
reportlab.graphics.utils.processGlyph
# Error: failed to find stubs
# ===========================
# Modules that are only used for testing
reportlab.graphics.testdrawings
reportlab.graphics.testshapes
reportlab.graphics.barcode.test

View File

@@ -0,0 +1,192 @@
from __future__ import annotations
from typing import Any
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import inch
from reportlab.platypus.flowables import Image
from reportlab.platypus.paragraph import Paragraph
from reportlab.platypus.tables import Table, TableStyle
data: list[list[Any]]
# Verify all the examples from the docs work
#
# TableStyle User Methods
#
LIST_STYLE = TableStyle(
[
("LINEABOVE", (0, 0), (-1, 0), 2, colors.green),
("LINEABOVE", (0, 1), (-1, -1), 0.25, colors.black),
("LINEBELOW", (0, -1), (-1, -1), 2, colors.green),
("ALIGN", (1, 1), (-1, -1), "RIGHT"),
]
)
LIST_STYLE.add("BACKGROUND", (0, 0), (-1, 0), colors.Color(0, 0.7, 0.7))
#
# TableStyle Cell Formatting Commands
#
data = [
["00", "01", "02", "03", "04"],
["10", "11", "12", "13", "14"],
["20", "21", "22", "23", "24"],
["30", "31", "32", "33", "34"],
]
t = Table(data)
t.setStyle(TableStyle([("BACKGROUND", (1, 1), (-2, -2), colors.green), ("TEXTCOLOR", (0, 0), (1, -1), colors.red)]))
data = [
["00", "01", "02", "03", "04"],
["10", "11", "12", "13", "14"],
["20", "21", "22", "23", "24"],
["30", "31", "32", "33", "34"],
]
t = Table(data, 5 * [0.4 * inch], 4 * [0.4 * inch])
# NOTE: I've modified this example to drop the optional TableStyle
# wrapper, so we test both variants
t.setStyle(
[
("ALIGN", (1, 1), (-2, -2), "RIGHT"),
("TEXTCOLOR", (1, 1), (-2, -2), colors.red),
("VALIGN", (0, 0), (0, -1), "TOP"),
("TEXTCOLOR", (0, 0), (0, -1), colors.blue),
("ALIGN", (0, -1), (-1, -1), "CENTER"),
("VALIGN", (0, -1), (-1, -1), "MIDDLE"),
("TEXTCOLOR", (0, -1), (-1, -1), colors.green),
("INNERGRID", (0, 0), (-1, -1), 0.25, colors.black),
("BOX", (0, 0), (-1, -1), 0.25, colors.black),
]
)
#
# Table Style Line Commands
#
data = [
["00", "01", "02", "03", "04"],
["10", "11", "12", "13", "14"],
["20", "21", "22", "23", "24"],
["30", "31", "32", "33", "34"],
]
Table(
data,
style=[
("GRID", (1, 1), (-2, -2), 1, colors.green),
("BOX", (0, 0), (1, -1), 2, colors.red),
("LINEABOVE", (1, 2), (-2, 2), 1, colors.blue),
("LINEBEFORE", (2, 1), (2, -2), 1, colors.pink),
],
)
data = [
["00", "01", "02", "03", "04"],
["10", "11", "12", "13", "14"],
["20", "21", "22", "23", "24"],
["30", "31", "32", "33", "34"],
]
Table(
data,
style=[
("GRID", (0, 0), (-1, -1), 0.5, colors.grey),
("GRID", (1, 1), (-2, -2), 1, colors.green),
("BOX", (0, 0), (1, -1), 2, colors.red),
("BOX", (0, 0), (-1, -1), 2, colors.black),
("LINEABOVE", (1, 2), (-2, 2), 1, colors.blue),
("LINEBEFORE", (2, 1), (2, -2), 1, colors.pink),
("BACKGROUND", (0, 0), (0, 1), colors.pink),
("BACKGROUND", (1, 1), (1, 2), colors.lavender),
("BACKGROUND", (2, 2), (2, 3), colors.orange),
],
)
#
# Complex Cell Values
#
styleSheet = getSampleStyleSheet()
I = Image("foo.jpg")
I.drawHeight = 1.25 * inch * I.drawHeight / I.drawWidth
I.drawWidth = 1.25 * inch
P0 = Paragraph(
"""<b>A pa<font color=red>r</font>a<i>graph</i></b>
<super><font color=yellow>1</font></super>""",
styleSheet["BodyText"],
)
P = Paragraph(
"""<para align=center spaceb=3>The <b>ReportLab Left
<font color=red>Logo</font></b>
Image</para>""",
styleSheet["BodyText"],
)
data = [
["A", "B", "C", P0, "D"],
["00", "01", "02", [I, P], "04"],
["10", "11", "12", [P, I], "14"],
["20", "21", "22", "23", "24"],
["30", "31", "32", "33", "34"],
]
Table(
data,
style=[
("GRID", (1, 1), (-2, -2), 1, colors.green),
("BOX", (0, 0), (1, -1), 2, colors.red),
("LINEABOVE", (1, 2), (-2, 2), 1, colors.blue),
("LINEBEFORE", (2, 1), (2, -2), 1, colors.pink),
("BACKGROUND", (0, 0), (0, 1), colors.pink),
("BACKGROUND", (1, 1), (1, 2), colors.lavender),
("BACKGROUND", (2, 2), (2, 3), colors.orange),
("BOX", (0, 0), (-1, -1), 2, colors.black),
("GRID", (0, 0), (-1, -1), 0.5, colors.black),
("VALIGN", (3, 0), (3, 0), "BOTTOM"),
("BACKGROUND", (3, 0), (3, 0), colors.limegreen),
("BACKGROUND", (3, 1), (3, 1), colors.khaki),
("ALIGN", (3, 1), (3, 1), "CENTER"),
("BACKGROUND", (3, 2), (3, 2), colors.beige),
("ALIGN", (3, 2), (3, 2), "LEFT"),
],
)
#
# TableStyle Span Commands
#
data = [
["Top\\nLeft", "", "02", "03", "04"],
["", "", "12", "13", "14"],
["20", "21", "22", "Bottom\\nRight", ""],
["30", "31", "32", "", ""],
]
Table(
data,
style=[
("GRID", (0, 0), (-1, -1), 0.5, colors.grey),
("BACKGROUND", (0, 0), (1, 1), colors.palegreen),
("SPAN", (0, 0), (1, 1)),
("BACKGROUND", (-2, -2), (-1, -1), colors.pink),
("SPAN", (-2, -2), (-1, -1)),
],
)
#
# TableStyle Miscellaneous Commands
#
# NOTE: This one doesn't provide any actual examples, we just
# make sure these pass into TableStyle/Table when mixed
# with other commands
TableStyle([("NOSPLIT", (0, 0), (1, 1))])
LIST_STYLE.add("NOSPLIT", (0, 0), (1, 1))
TableStyle([("ROUNDEDCORNERS", [0, 0, 5, 5])])
TableStyle([("ROUNDEDCORNERS", (0, 0, 5, 5))])
LIST_STYLE.add("ROUNDEDCORNERS", [0, 0, 5, 5])
LIST_STYLE.add("ROUNDEDCORNERS", (0, 0, 5, 5))
Table(
[["foo"]],
style=[
("GRID", (0, 0), (-1, -1), 0.5, colors.grey),
("BACKGROUND", (0, 0), (0, 1), colors.pink),
("NOSPLIT", (0, 0), (1, 1)),
("ROUNDEDCORNERS", [0, 0, 5, 5]),
],
)

View File

@@ -0,0 +1,6 @@
version = "4.2.*"
# NOTE: There is no public upstream repository
[tool.stubtest]
apt_dependencies = ["libcairo2-dev"]
extras = ["pycairo"]

View File

@@ -0,0 +1,11 @@
from _typeshed import SupportsRichComparison
from typing import Final, Literal, TypeVar
_SupportsRichComparisonT = TypeVar("_SupportsRichComparisonT", bound=SupportsRichComparison)
Version: Final[str]
__version__: Final[str]
__date__: Final[str]
__min_python_version__: Final[tuple[int, int]]
def cmp(a: _SupportsRichComparisonT, b: _SupportsRichComparisonT) -> Literal[-1, 0, 1]: ...

View File

@@ -0,0 +1,3 @@
from typing import Final
__version__: Final[str]

View File

@@ -0,0 +1,5 @@
def registerWidget(widget) -> None: ...
def getCodes(): ...
def getCodeNames(): ...
def createBarcodeDrawing(codeName, **options): ...
def createBarcodeImageInMemory(codeName, **options): ...

View File

@@ -0,0 +1,33 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import MultiWidthBarcode
starta: Incomplete
startb: Incomplete
startc: Incomplete
stop: Incomplete
seta: Incomplete
setb: Incomplete
setc: Incomplete
setmap: Incomplete
cStarts: Incomplete
tos: Incomplete
class Code128(MultiWidthBarcode):
barWidth: Incomplete
lquiet: Incomplete
rquiet: Incomplete
quiet: int
barHeight: Incomplete
def __init__(self, value: str = "", **args) -> None: ...
valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self): ...
decomposed: Incomplete
def decompose(self): ...
class Code128Auto(Code128):
encoded: Incomplete
def encode(self): ...

View File

@@ -0,0 +1,32 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import Barcode
class _Code39Base(Barcode):
barWidth: Incomplete
lquiet: Incomplete
rquiet: Incomplete
quiet: int
gap: Incomplete
barHeight: Incomplete
ratio: float
checksum: int
bearers: float
stop: int
def __init__(self, value: str = "", **args) -> None: ...
decomposed: Incomplete
def decompose(self): ...
class Standard39(_Code39Base):
valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self): ...
class Extended39(_Code39Base):
valid: int
validated: Incomplete
def validate(self): ...
encoded: str
def encode(self): ...

View File

@@ -0,0 +1,28 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import MultiWidthBarcode
class _Code93Base(MultiWidthBarcode):
barWidth: Incomplete
lquiet: Incomplete
rquiet: Incomplete
quiet: int
barHeight: Incomplete
stop: int
def __init__(self, value: str = "", **args) -> None: ...
decomposed: Incomplete
def decompose(self): ...
class Standard93(_Code93Base):
valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self): ...
class Extended93(_Code93Base):
valid: int
validated: Incomplete
def validate(self): ...
encoded: str
def encode(self): ...

View File

@@ -0,0 +1,124 @@
from _typeshed import Incomplete
from reportlab.platypus.flowables import Flowable
class Barcode(Flowable):
fontName: str
fontSize: int
humanReadable: int
value: Incomplete
gap: Incomplete
def __init__(self, value: str = "", **kwd) -> None: ...
valid: int
validated: Incomplete
def validate(self) -> None: ...
encoded: Incomplete
def encode(self) -> None: ...
decomposed: Incomplete
def decompose(self) -> None: ...
barHeight: Incomplete
def computeSize(self, *args) -> None: ...
@property
def width(self): ...
@width.setter
def width(self, v) -> None: ...
@property
def height(self): ...
@height.setter
def height(self, v) -> None: ...
def draw(self) -> None: ...
def drawHumanReadable(self) -> None: ...
def rect(self, x, y, w, h) -> None: ...
def annotate(self, x, y, text, fontName, fontSize, anchor: str = "middle") -> None: ...
class MultiWidthBarcode(Barcode):
barHeight: Incomplete
def computeSize(self, *args) -> None: ...
def draw(self) -> None: ...
class I2of5(Barcode):
patterns: Incomplete
barHeight: Incomplete
barWidth: Incomplete
ratio: float
checksum: int
bearers: float
bearerBox: bool
quiet: int
lquiet: Incomplete
rquiet: Incomplete
stop: int
def __init__(self, value: str = "", **args) -> None: ...
valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self) -> None: ...
decomposed: Incomplete
def decompose(self): ...
class MSI(Barcode):
patterns: Incomplete
stop: int
barHeight: Incomplete
barWidth: Incomplete
ratio: float
checksum: int
bearers: float
quiet: int
lquiet: Incomplete
rquiet: Incomplete
def __init__(self, value: str = "", **args) -> None: ...
valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self) -> None: ...
decomposed: Incomplete
def decompose(self): ...
class Codabar(Barcode):
patterns: Incomplete
values: Incomplete
chars: Incomplete
stop: int
barHeight: Incomplete
barWidth: Incomplete
ratio: float
checksum: int
bearers: float
quiet: int
lquiet: Incomplete
rquiet: Incomplete
def __init__(self, value: str = "", **args) -> None: ...
valid: int
Valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self) -> None: ...
decomposed: Incomplete
def decompose(self): ...
class Code11(Barcode):
chars: str
patterns: Incomplete
values: Incomplete
stop: int
barHeight: Incomplete
barWidth: Incomplete
ratio: float
checksum: int
bearers: float
quiet: int
lquiet: Incomplete
rquiet: Incomplete
def __init__(self, value: str = "", **args) -> None: ...
valid: int
Valid: int
validated: Incomplete
def validate(self): ...
encoded: Incomplete
def encode(self) -> None: ...
decomposed: Incomplete
def decompose(self): ...

View File

@@ -0,0 +1,68 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import Barcode
from reportlab.graphics.widgetbase import Widget
class _DMTXCheck:
@classmethod
def pylibdmtx_check(cls) -> None: ...
class DataMatrix(Barcode, _DMTXCheck):
color: Incomplete
bgColor: Incomplete
def __init__(self, value: str = "", **kwds) -> None: ...
@property
def value(self): ...
@value.setter
def value(self, v) -> None: ...
@property
def size(self): ...
@size.setter
def size(self, v) -> None: ...
@property
def border(self): ...
@border.setter
def border(self, v) -> None: ...
@property
def x(self): ...
@x.setter
def x(self, v) -> None: ...
@property
def y(self): ...
@y.setter
def y(self, v) -> None: ...
@property
def cellSize(self): ...
@cellSize.setter
def cellSize(self, v) -> None: ...
@property
def encoding(self): ...
@encoding.setter
def encoding(self, v) -> None: ...
@property
def anchor(self): ...
@anchor.setter
def anchor(self, v) -> None: ...
def recalc(self) -> None: ...
@property
def matrix(self): ...
@property # type: ignore[misc]
def width(self): ...
@property # type: ignore[misc]
def height(self): ...
@property
def cellWidth(self): ...
@property
def cellHeight(self): ...
def draw(self) -> None: ...
class DataMatrixWidget(Widget, _DMTXCheck):
codeName: str
value: Incomplete
def __init__(self, value: str = "Hello Cruel World!", **kwds) -> None: ...
def rect(self, x, y, w, h, fill: int = 1, stroke: int = 0) -> None: ...
def saveState(self, *args, **kwds) -> None: ...
restoreState = saveState
setStrokeColor = saveState
def setFillColor(self, c) -> None: ...
def draw(self): ...

View File

@@ -0,0 +1,41 @@
from _typeshed import Incomplete
from reportlab.graphics.charts.areas import PlotArea
from reportlab.lib.attrmap import *
class Ean13BarcodeWidget(PlotArea):
codeName: str
barHeight: Incomplete
barWidth: Incomplete
humanReadable: int
quiet: int
rquiet: Incomplete
lquiet: Incomplete
fontSize: int
fontName: str
textColor: Incomplete
barFillColor: Incomplete
barStrokeColor: Incomplete
barStrokeWidth: int
x: int
y: int
value: Incomplete
def __init__(self, value: str = "123456789012", **kw) -> None: ...
@property
def width(self): ...
def wrap(self, aW, aH): ...
def draw(self): ...
class Ean8BarcodeWidget(Ean13BarcodeWidget):
codeName: str
class UPCA(Ean13BarcodeWidget):
codeName: str
class Ean5BarcodeWidget(Ean13BarcodeWidget):
codeName: str
def draw(self): ...
class ISBNBarcodeWidget(Ean13BarcodeWidget):
codeName: str
def draw(self): ...

View File

@@ -0,0 +1,22 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import Barcode
class ECC200DataMatrix(Barcode):
barWidth: int
row_modules: int
col_modules: int
row_regions: int
col_regions: int
cw_data: int
cw_ecc: int
row_usable_modules: Incomplete
col_usable_modules: Incomplete
def __init__(self, *args, **kwargs) -> None: ...
valid: int
validated: Incomplete
def validate(self) -> None: ...
encoded: Incomplete
def encode(self): ...
def computeSize(self, *args) -> None: ...
def draw(self) -> None: ...

View File

@@ -0,0 +1,41 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.code39 import Standard39
class BaseLTOLabel(Standard39):
LABELWIDTH: Incomplete
LABELHEIGHT: Incomplete
LABELROUND: Incomplete
CODERATIO: float
CODENOMINALWIDTH: Incomplete
CODEBARHEIGHT: Incomplete
CODEBARWIDTH: Incomplete
CODEGAP = CODEBARWIDTH
CODELQUIET: Incomplete
CODERQUIET: Incomplete
height: Incomplete
border: Incomplete
label: Incomplete
def __init__(
self,
prefix: str = "",
number: Incomplete | None = None,
subtype: str = "1",
border: Incomplete | None = None,
checksum: bool = False,
availheight: Incomplete | None = None,
) -> None: ...
def drawOn(self, canvas, x, y) -> None: ...
class VerticalLTOLabel(BaseLTOLabel):
LABELFONT: Incomplete
BLOCKWIDTH: Incomplete
BLOCKHEIGHT: Incomplete
LINEWIDTH: float
NBBLOCKS: int
COLORSCHEME: Incomplete
colored: Incomplete
def __init__(self, *args, **kwargs) -> None: ...
def drawOn(self, canvas, x, y) -> None: ...
def test() -> None: ...

View File

@@ -0,0 +1,52 @@
from _typeshed import Incomplete
from reportlab.graphics.shapes import Rect
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.validators import Validator
from reportlab.platypus.flowables import Flowable
__all__ = ["QrCodeWidget"]
class _isLevel(Validator):
def test(self, x): ...
isLevel: _isLevel
class _isUnicodeOrQRList(Validator):
def test(self, x): ...
def normalize(self, x): ...
isUnicodeOrQRList: _isUnicodeOrQRList
class SRect(Rect):
def __init__(self, x, y, width, height, fillColor=...) -> None: ...
class QrCodeWidget(Widget):
codeName: str
x: int
y: int
barFillColor: Incomplete
barStrokeColor: Incomplete
barStrokeWidth: int
barHeight: Incomplete
barWidth: Incomplete
barBorder: int
barLevel: str
qrVersion: Incomplete
value: Incomplete
def __init__(self, value: str = "Hello World", **kw) -> None: ...
def addData(self, value) -> None: ...
def draw(self): ...
class QrCode(Flowable):
height: Incomplete
width: Incomplete
qrBorder: int
qrLevel: str
qrVersion: Incomplete
value: Incomplete
qr: Incomplete
def __init__(self, value: Incomplete | None = None, **kw) -> None: ...
def addData(self, value) -> None: ...
def draw(self) -> None: ...
def rect(self, x, y, w, h) -> None: ...

View File

@@ -0,0 +1,202 @@
from _typeshed import Incomplete
unicode = str
class QR:
valid: Incomplete
bits: Incomplete
group: int
data: Incomplete
def __init__(self, data) -> None: ...
def __len__(self) -> int: ...
@property
def bitlength(self): ...
def getLengthBits(self, ver): ...
def getLength(self): ...
def write_header(self, buffer, version) -> None: ...
def write(self, buffer, version) -> None: ...
class QRNumber(QR):
valid: Incomplete
chars: str
bits: Incomplete
group: int
mode: int
lengthbits: Incomplete
class QRAlphaNum(QR):
valid: Incomplete
chars: str
bits: Incomplete
group: int
mode: int
lengthbits: Incomplete
class QR8bitByte(QR):
bits: Incomplete
group: int
mode: int
lengthbits: Incomplete
data: Incomplete
def __init__(self, data) -> None: ...
def write(self, buffer, version) -> None: ...
class QRKanji(QR):
bits: Incomplete
group: int
mode: int
lengthbits: Incomplete
data: Incomplete
def __init__(self, data) -> None: ...
def unicode_to_qrkanji(self, data): ...
def write(self, buffer, version) -> None: ...
class QRHanzi(QR):
bits: Incomplete
group: int
mode: int
lengthbits: Incomplete
data: Incomplete
def __init__(self, data) -> None: ...
def unicode_to_qrhanzi(self, data): ...
def write_header(self, buffer, version) -> None: ...
def write(self, buffer, version) -> None: ...
class QRECI(QR):
mode: int
lengthbits: Incomplete
data: Incomplete
def __init__(self, data) -> None: ...
def write(self, buffer, version) -> None: ...
class QRStructAppend(QR):
mode: int
lengthbits: Incomplete
part: Incomplete
total: Incomplete
parity: Incomplete
def __init__(self, part, total, parity) -> None: ...
def write(self, buffer, version) -> None: ...
class QRFNC1First(QR):
mode: int
lengthbits: Incomplete
def __init__(self) -> None: ...
def write(self, buffer, version) -> None: ...
class QRFNC1Second(QR):
valid: Incomplete
mode: int
lengthbits: Incomplete
def write(self, buffer, version) -> None: ...
class QRCode:
version: Incomplete
errorCorrectLevel: Incomplete
modules: Incomplete
moduleCount: int
dataCache: Incomplete
dataList: Incomplete
def __init__(self, version, errorCorrectLevel) -> None: ...
def addData(self, data) -> None: ...
def isDark(self, row, col): ...
def getModuleCount(self): ...
def calculate_version(self): ...
def make(self) -> None: ...
def makeImpl(self, test, maskPattern) -> None: ...
def setupPositionProbePattern(self, row, col) -> None: ...
def getBestMaskPattern(self): ...
def setupTimingPattern(self) -> None: ...
def setupPositionAdjustPattern(self) -> None: ...
def setupTypeNumber(self, test) -> None: ...
def setupTypeInfo(self, test, maskPattern) -> None: ...
def dataPosIterator(self): ...
def dataBitIterator(self, data): ...
def mapData(self, data, maskPattern) -> None: ...
PAD0: int
PAD1: int
@staticmethod
def createData(version, errorCorrectLevel, dataList): ...
@staticmethod
def createBytes(buffer, rsBlocks): ...
class QRErrorCorrectLevel:
L: int
M: int
Q: int
H: int
class QRMaskPattern:
PATTERN000: int
PATTERN001: int
PATTERN010: int
PATTERN011: int
PATTERN100: int
PATTERN101: int
PATTERN110: int
PATTERN111: int
class QRUtil:
PATTERN_POSITION_TABLE: Incomplete
G15: Incomplete
G18: Incomplete
G15_MASK: Incomplete
@staticmethod
def getBCHTypeInfo(data): ...
@staticmethod
def getBCHTypeNumber(data): ...
@staticmethod
def getBCHDigit(data): ...
@staticmethod
def getPatternPosition(version): ...
maskPattern: Incomplete
@classmethod
def getMask(cls, maskPattern): ...
@staticmethod
def getErrorCorrectPolynomial(errorCorrectLength): ...
@classmethod
def maskScoreRule1vert(cls, modules): ...
@classmethod
def maskScoreRule2(cls, modules): ...
@classmethod
def maskScoreRule3hor(cls, modules, pattern=...): ...
@classmethod
def maskScoreRule4(cls, modules): ...
@classmethod
def getLostPoint(cls, qrCode): ...
class QRMath:
@staticmethod
def glog(n): ...
@staticmethod
def gexp(n): ...
EXP_TABLE: Incomplete
LOG_TABLE: Incomplete
class QRPolynomial:
num: Incomplete
def __init__(self, num, shift) -> None: ...
def get(self, index): ...
def getLength(self): ...
def multiply(self, e): ...
def mod(self, e): ...
class QRRSBlock:
RS_BLOCK_TABLE: Incomplete
totalCount: Incomplete
dataCount: Incomplete
def __init__(self, totalCount, dataCount) -> None: ...
@staticmethod
def getRSBlocks(version, errorCorrectLevel): ...
@staticmethod
def getRsBlockTable(version, errorCorrectLevel): ...
class QRBitBuffer:
buffer: Incomplete
length: int
def __init__(self) -> None: ...
def get(self, index): ...
def put(self, num, length) -> None: ...
def getLengthInBits(self): ...
def putBit(self, bit) -> None: ...

View File

@@ -0,0 +1,36 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import Barcode
class FIM(Barcode):
barWidth: Incomplete
spaceWidth: Incomplete
barHeight: Incomplete
rquiet: Incomplete
lquiet: Incomplete
quiet: int
def __init__(self, value: str = "", **args) -> None: ...
valid: int
validated: str
def validate(self): ...
decomposed: str
def decompose(self): ...
def computeSize(self) -> None: ...
def draw(self) -> None: ...
class POSTNET(Barcode):
quiet: int
shortHeight: Incomplete
barHeight: Incomplete
barWidth: Incomplete
spaceWidth: Incomplete
def __init__(self, value: str = "", **args) -> None: ...
validated: str
valid: int
def validate(self): ...
encoded: str
def encode(self): ...
decomposed: str
def decompose(self): ...
def computeSize(self) -> None: ...
def draw(self) -> None: ...

View File

@@ -0,0 +1,85 @@
from _typeshed import Incomplete
from reportlab.graphics.barcode.common import Barcode
class USPS_4State(Barcode):
tops: Incomplete
bottoms: Incomplete
dimensions: Incomplete
def __init__(self, value: str = "01234567094987654321", routing: str = "", **kwd) -> None: ...
@staticmethod
def scale(kind, D, s): ...
@property
def tracking(self): ...
@tracking.setter
def tracking(self, tracking) -> None: ...
@property
def routing(self): ...
@routing.setter
def routing(self, routing) -> None: ...
@property
def widthSize(self): ...
@widthSize.setter
def widthSize(self, value) -> None: ...
@property
def heightSize(self): ...
@heightSize.setter
def heightSize(self, value) -> None: ...
@property
def fontSize(self): ...
@fontSize.setter
def fontSize(self, value) -> None: ...
@property
def humanReadable(self): ...
@humanReadable.setter
def humanReadable(self, value) -> None: ...
@property
def binary(self): ...
@property
def codewords(self): ...
@property
def table1(self): ...
@property
def table2(self): ...
@property
def characters(self): ...
@property
def barcodes(self): ...
table4: Incomplete
@property
def horizontalClearZone(self): ...
@property
def verticalClearZone(self): ...
@property
def barWidth(self): ...
@barWidth.setter
def barWidth(self, value) -> None: ...
@property
def pitch(self): ...
@pitch.setter
def pitch(self, value) -> None: ...
@property
def barHeight(self): ...
@barHeight.setter
def barHeight(self, value) -> None: ...
@property
def widthScale(self): ...
@property
def heightScale(self): ...
@property
def width(self): ...
@width.setter
def width(self, v) -> None: ...
@property
def height(self): ...
@height.setter
def height(self, v) -> None: ...
def computeSize(self) -> None: ...
def wrap(self, aW, aH): ...
def draw(self) -> None: ...
@property
def value(self): ...
@value.setter
def value(self, value) -> None: ...
def drawHumanReadable(self) -> None: ...
def annotate(self, x, y, text, fontName, fontSize, anchor: str = "middle") -> None: ...

View File

@@ -0,0 +1,65 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.areas import PlotArea
from reportlab.lib.colors import black
class _BarcodeWidget(PlotArea):
textColor = black
barFillColor = black
barStrokeColor: Incomplete
barStrokeWidth: int
x: int
def __init__(self, _value: str = "", **kw) -> None: ...
def rect(self, x, y, w, h, **kw) -> None: ...
canv: Incomplete
def draw(self): ...
def annotate(self, x, y, text, fontName, fontSize, anchor: str = "middle") -> None: ...
class BarcodeI2of5(_BarcodeWidget):
codeName: Final = "I2of5"
def __init__(self, **kw) -> None: ...
class BarcodeCode128(_BarcodeWidget):
codeName: Final = "Code128"
def __init__(self, **kw) -> None: ...
class BarcodeStandard93(_BarcodeWidget):
codeName: Final = "Standard93"
def __init__(self, **kw) -> None: ...
class BarcodeExtended93(_BarcodeWidget):
codeName: Final = "Extended93"
def __init__(self, **kw) -> None: ...
class BarcodeStandard39(_BarcodeWidget):
codeName: Final = "Standard39"
def __init__(self, **kw) -> None: ...
class BarcodeExtended39(_BarcodeWidget):
codeName: Final = "Extended39"
def __init__(self, **kw) -> None: ...
class BarcodeMSI(_BarcodeWidget):
codeName: Final = "MSI"
def __init__(self, **kw) -> None: ...
class BarcodeCodabar(_BarcodeWidget):
codeName: Final = "Codabar"
def __init__(self, **kw) -> None: ...
class BarcodeCode11(_BarcodeWidget):
codeName: Final = "Code11"
def __init__(self, **kw) -> None: ...
class BarcodeFIM(_BarcodeWidget):
codeName: Final = "FIM"
def __init__(self, **kw) -> None: ...
class BarcodePOSTNET(_BarcodeWidget):
codeName: Final = "POSTNET"
def __init__(self, **kw) -> None: ...
class BarcodeUSPS_4State(_BarcodeWidget):
codeName: Final = "USPS_4State"
def __init__(self, **kw) -> None: ...

View File

@@ -0,0 +1,3 @@
from typing import Final
__version__: Final[str]

View File

@@ -0,0 +1,19 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
__version__: Final[str]
class PlotArea(Widget):
x: int
y: int
height: int
width: int
strokeColor: Incomplete
strokeWidth: int
fillColor: Incomplete
background: Incomplete
debug: int
def __init__(self) -> None: ...
def makeBackground(self): ...

View File

@@ -0,0 +1,205 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.textlabels import PMVLabel
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import Validator
__version__: Final[str]
class AxisLabelAnnotation:
def __init__(self, v, **kwds) -> None: ...
def __call__(self, axis): ...
class AxisLineAnnotation:
def __init__(self, v, **kwds) -> None: ...
def __call__(self, axis): ...
class AxisBackgroundAnnotation:
def __init__(self, colors, **kwds) -> None: ...
def __call__(self, axis): ...
class TickLU:
accuracy: Incomplete
T: Incomplete
def __init__(self, *T, **kwds) -> None: ...
def __contains__(self, t) -> bool: ...
def __getitem__(self, t): ...
class _AxisG(Widget):
def makeGrid(self, g, dim: Incomplete | None = None, parent: Incomplete | None = None, exclude=[]) -> None: ...
def getGridDims(self, start: Incomplete | None = None, end: Incomplete | None = None): ...
@property
def isYAxis(self): ...
@property
def isXAxis(self): ...
def addAnnotations(self, g, A: Incomplete | None = None) -> None: ...
def draw(self): ...
class CALabel(PMVLabel):
def __init__(self, **kw) -> None: ...
class CategoryAxis(_AxisG):
visible: int
visibleAxis: int
visibleTicks: int
visibleLabels: int
visibleGrid: int
drawGridLast: bool
strokeWidth: int
strokeColor: Incomplete
strokeDashArray: Incomplete
gridStrokeLineJoin: Incomplete
gridStrokeLineCap: Incomplete
gridStrokeMiterLimit: Incomplete
gridStrokeWidth: float
gridStrokeColor: Incomplete
gridStrokeDashArray: Incomplete
gridStart: Incomplete
strokeLineJoin: Incomplete
strokeLineCap: Incomplete
strokeMiterLimit: Incomplete
labels: Incomplete
categoryNames: Incomplete
joinAxis: Incomplete
joinAxisPos: Incomplete
joinAxisMode: Incomplete
labelAxisMode: str
reverseDirection: int
style: str
tickShift: int
loPad: int
hiPad: int
loLLen: int
hiLLen: int
def __init__(self) -> None: ...
def setPosition(self, x, y, length) -> None: ...
def configure(self, multiSeries, barWidth: Incomplete | None = None) -> None: ...
def scale(self, idx): ...
def midScale(self, idx): ...
class _XTicks:
@property
def actualTickStrokeWidth(self): ...
@property
def actualTickStrokeColor(self): ...
def makeTicks(self): ...
class _YTicks(_XTicks):
def makeTicks(self): ...
class XCategoryAxis(_XTicks, CategoryAxis):
tickUp: int
tickDown: int
def __init__(self) -> None: ...
categoryNames: Incomplete
def demo(self): ...
def joinToAxis(self, yAxis, mode: str = "bottom", pos: Incomplete | None = None) -> None: ...
def loScale(self, idx): ...
def makeAxis(self): ...
def makeTickLabels(self): ...
class YCategoryAxis(_YTicks, CategoryAxis):
tickLeft: int
tickRight: int
def __init__(self) -> None: ...
categoryNames: Incomplete
def demo(self): ...
def joinToAxis(self, xAxis, mode: str = "left", pos: Incomplete | None = None) -> None: ...
def loScale(self, idx): ...
def makeAxis(self): ...
def makeTickLabels(self): ...
class TickLabeller:
def __call__(self, axis, value): ...
class ValueAxis(_AxisG):
def __init__(self, **kw) -> None: ...
def setPosition(self, x, y, length) -> None: ...
def configure(self, dataSeries) -> None: ...
def makeTickLabels(self): ...
def scale(self, value): ...
class XValueAxis(_XTicks, ValueAxis):
tickUp: int
tickDown: int
joinAxis: Incomplete
joinAxisMode: Incomplete
joinAxisPos: Incomplete
def __init__(self, **kw) -> None: ...
def demo(self): ...
def joinToAxis(self, yAxis, mode: str = "bottom", pos: Incomplete | None = None) -> None: ...
def makeAxis(self): ...
def parseDayAndMonth(dmstr): ...
class _isListOfDaysAndMonths(Validator):
def test(self, x): ...
def normalize(self, x): ...
isListOfDaysAndMonths: Incomplete
class NormalDateXValueAxis(XValueAxis):
bottomAxisLabelSlack: float
niceMonth: int
forceEndDate: int
forceFirstDate: int
forceDatesEachYear: Incomplete
dailyFreq: int
xLabelFormat: str
dayOfWeekName: Incomplete
monthName: Incomplete
specialTickClear: int
valueSteps: Incomplete
def __init__(self, **kw) -> None: ...
def configure(self, data) -> None: ...
class YValueAxis(_YTicks, ValueAxis):
tickRight: int
tickLeft: int
joinAxis: Incomplete
joinAxisMode: Incomplete
joinAxisPos: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def joinToAxis(self, xAxis, mode: str = "left", pos: Incomplete | None = None) -> None: ...
def makeAxis(self): ...
class TimeValueAxis:
labelTextFormat: Incomplete
def __init__(self, *args, **kwds) -> None: ...
def timeLabelTextFormatter(self, val): ...
class XTimeValueAxis(TimeValueAxis, XValueAxis):
def __init__(self, *args, **kwds) -> None: ...
class AdjYValueAxis(YValueAxis):
requiredRange: int
leftAxisPercent: int
leftAxisOrigShiftIPC: float
leftAxisOrigShiftMin: int
leftAxisSkipLL0: int
valueSteps: Incomplete
def __init__(self, **kw) -> None: ...
class LogValueAxis(ValueAxis): ...
class LogAxisTickLabeller(TickLabeller):
def __call__(self, axis, value): ...
class LogAxisTickLabellerS(TickLabeller):
def __call__(self, axis, value): ...
class LogAxisLabellingSetup:
labels: Incomplete
labelTextFormat: Incomplete
def __init__(self) -> None: ...
class LogXValueAxis(LogValueAxis, LogAxisLabellingSetup, XValueAxis):
def __init__(self) -> None: ...
def scale(self, value): ...
class LogYValueAxis(LogValueAxis, LogAxisLabellingSetup, YValueAxis):
def __init__(self) -> None: ...
def scale(self, value): ...

View File

@@ -0,0 +1,105 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.areas import PlotArea
from reportlab.graphics.shapes import Drawing
from reportlab.graphics.widgetbase import PropHolder
__version__: Final[str]
class BarChartProperties(PropHolder):
strokeColor: Incomplete
fillColor: Incomplete
strokeWidth: float
symbol: Incomplete
strokeDashArray: Incomplete
def __init__(self) -> None: ...
class BarChart(PlotArea):
def makeSwatchSample(self, rowNo, x, y, width, height): ...
def getSeriesName(self, i, default: Incomplete | None = None): ...
categoryAxis: Incomplete
valueAxis: Incomplete
barSpacing: int
reversePlotOrder: int
data: Incomplete
useAbsolute: int
barWidth: int
groupSpacing: int
barLabels: Incomplete
barLabelFormat: Incomplete
barLabelArray: Incomplete
bars: Incomplete
naLabel: Incomplete
zIndexOverrides: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def getSeriesOrder(self) -> None: ...
def calcBarPositions(self) -> None: ...
def makeBars(self): ...
def draw(self): ...
class VerticalBarChart(BarChart): ...
class HorizontalBarChart(BarChart): ...
class _FakeGroup:
def __init__(self, cmp: Incomplete | None = None) -> None: ...
def add(self, what) -> None: ...
def value(self): ...
def sort(self) -> None: ...
class BarChart3D(BarChart):
theta_x: float
theta_y: float
zDepth: Incomplete
zSpace: Incomplete
def calcBarPositions(self) -> None: ...
def makeBars(self): ...
class VerticalBarChart3D(BarChart3D, VerticalBarChart): ...
class HorizontalBarChart3D(BarChart3D, HorizontalBarChart): ...
def sampleV0a(): ...
def sampleV0b(): ...
def sampleV0c(): ...
def sampleV1(): ...
def sampleV2a(): ...
def sampleV2b(): ...
def sampleV2c(): ...
def sampleV3(): ...
def sampleV4a(): ...
def sampleV4b(): ...
def sampleV4c(): ...
def sampleV4d(): ...
dataSample5: Incomplete
def sampleV5a(): ...
def sampleV5b(): ...
def sampleV5c1(): ...
def sampleV5c2(): ...
def sampleV5c3(): ...
def sampleV5c4(): ...
def sampleH0a(): ...
def sampleH0b(): ...
def sampleH0c(): ...
def sampleH1(): ...
def sampleH2a(): ...
def sampleH2b(): ...
def sampleH2c(): ...
def sampleH3(): ...
def sampleH4a(): ...
def sampleH4b(): ...
def sampleH4c(): ...
def sampleH4d(): ...
def sampleH5a(): ...
def sampleH5b(): ...
def sampleH5c1(): ...
def sampleH5c2(): ...
def sampleH5c3(): ...
def sampleH5c4(): ...
def sampleSymbol1(): ...
def sampleStacked1(): ...
class SampleH5c4(Drawing):
def __init__(self, width: int = 400, height: int = 200, *args, **kw) -> None: ...

View File

@@ -0,0 +1,24 @@
from _typeshed import Incomplete
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
class DotBox(Widget):
xlabels: Incomplete
ylabels: Incomplete
labelFontName: str
labelFontSize: int
labelOffset: int
strokeWidth: float
gridDivWidth: Incomplete
gridColor: Incomplete
dotDiameter: Incomplete
dotColor: Incomplete
dotXPosition: int
dotYPosition: int
x: int
y: int
def __init__(self) -> None: ...
def demo(self, drawing: Incomplete | None = None): ...
def draw(self): ...

View File

@@ -0,0 +1,34 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.piecharts import AbstractPieChart, WedgeProperties
from reportlab.lib.attrmap import *
__version__: Final[str]
class SectorProperties(WedgeProperties): ...
class Doughnut(AbstractPieChart):
x: int
y: int
width: int
height: int
data: Incomplete
labels: Incomplete
startAngle: int
direction: str
simpleLabels: int
checkLabelOverlap: int
sideLabels: int
innerRadiusFraction: Incomplete
slices: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def normalizeData(self, data: Incomplete | None = None): ...
def makeSectors(self): ...
def draw(self): ...
def sample1(): ...
def sample2(): ...
def sample3(): ...
def sample4(): ...

View File

@@ -0,0 +1,101 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import PropHolder, Widget
from reportlab.lib.attrmap import *
__version__: Final[str]
class SubColProperty(PropHolder):
dividerLines: int
class LegendCallout:
def __call__(self, legend, g, thisx, y, colName) -> None: ...
class LegendSwatchCallout(LegendCallout):
def __call__(self, legend, g, thisx, y, i, colName, swatch) -> None: ... # type: ignore[override]
class LegendColEndCallout(LegendCallout):
def __call__(self, legend, g, x, xt, y, width, lWidth) -> None: ... # type: ignore[override]
class Legend(Widget):
x: int
y: int
alignment: str
deltax: int
deltay: int
autoXPadding: int
autoYPadding: int
dx: int
dy: int
swdx: int
swdy: int
dxTextSpace: int
columnMaximum: int
colorNamePairs: Incomplete
fontName: Incomplete
fontSize: Incomplete
leading: Incomplete
fillColor: Incomplete
strokeColor: Incomplete
strokeWidth: Incomplete
swatchMarker: Incomplete
boxAnchor: str
yGap: int
variColumn: int
dividerLines: int
dividerWidth: float
dividerDashArray: Incomplete
dividerColor: Incomplete
dividerOffsX: Incomplete
dividerOffsY: int
colEndCallout: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
def demo(self): ...
class TotalAnnotator(LegendColEndCallout):
lText: Incomplete
rText: Incomplete
fontName: Incomplete
fontSize: Incomplete
fillColor: Incomplete
dy: Incomplete
dx: Incomplete
dly: Incomplete
dlx: Incomplete
strokeWidth: Incomplete
strokeColor: Incomplete
strokeDashArray: Incomplete
def __init__(
self,
lText: str = "Total",
rText: str = "0.0",
fontName="Times-Roman",
fontSize: int = 10,
fillColor=...,
strokeWidth: float = 0.5,
strokeColor=...,
strokeDashArray: Incomplete | None = None,
dx: int = 0,
dy: int = 0,
dly: int = 0,
dlx=(0, 0),
) -> None: ...
def __call__(self, legend, g, x, xt, y, width, lWidth) -> None: ... # type: ignore[override]
class LineSwatch(Widget):
x: int
y: int
width: int
height: int
strokeColor: Incomplete
strokeDashArray: Incomplete
strokeWidth: int
def __init__(self) -> None: ...
def draw(self): ...
class LineLegend(Legend):
dx: int
dy: int
def __init__(self) -> None: ...

View File

@@ -0,0 +1,67 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.areas import PlotArea
from reportlab.graphics.widgetbase import PropHolder
from reportlab.lib.attrmap import *
__version__: Final[str]
class LineChartProperties(PropHolder): ...
class AbstractLineChart(PlotArea):
def makeSwatchSample(self, rowNo, x, y, width, height): ...
def getSeriesName(self, i, default: Incomplete | None = None): ...
class LineChart(AbstractLineChart): ...
class HorizontalLineChart(LineChart):
strokeColor: Incomplete
fillColor: Incomplete
categoryAxis: Incomplete
valueAxis: Incomplete
data: Incomplete
categoryNames: Incomplete
lines: Incomplete
useAbsolute: int
groupSpacing: int
lineLabels: Incomplete
lineLabelFormat: Incomplete
lineLabelArray: Incomplete
lineLabelNudge: int
joinedLines: int
inFill: int
reversePlotOrder: int
def __init__(self) -> None: ...
def demo(self): ...
def calcPositions(self) -> None: ...
def drawLabel(self, G, rowNo, colNo, x, y) -> None: ...
def makeLines(self): ...
def draw(self): ...
class _FakeGroup:
def __init__(self) -> None: ...
def add(self, what) -> None: ...
def value(self): ...
def sort(self) -> None: ...
class HorizontalLineChart3D(HorizontalLineChart):
theta_x: float
theta_y: float
zDepth: int
zSpace: int
def calcPositions(self) -> None: ...
def makeLines(self): ...
class VerticalLineChart(LineChart): ...
def sample1(): ...
class SampleHorizontalLineChart(HorizontalLineChart):
def demo(self): ...
def makeBackground(self): ...
def sample1a(): ...
def sample2(): ...
def sample3(): ...
def sampleCandleStick(): ...

View File

@@ -0,0 +1,119 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.linecharts import AbstractLineChart
from reportlab.graphics.charts.utils import *
from reportlab.graphics.shapes import Polygon, _SetKeyWordArgs
from reportlab.graphics.widgetbase import PropHolder
from reportlab.graphics.widgets.grids import ShadedPolygon
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
__version__: Final[str]
class LinePlotProperties(PropHolder): ...
class InFillValue(int):
yValue: Incomplete
def __new__(cls, v, yValue: Incomplete | None = None): ...
class Shader(_SetKeyWordArgs):
def shade(self, lp, g, rowNo, rowColor, row) -> None: ...
class NoFiller:
def fill(self, lp, g, rowNo, rowColor, points) -> None: ...
class Filler:
__dict__: Incomplete
def __init__(self, **kw) -> None: ...
def fill(self, lp, g, rowNo, rowColor, points) -> None: ...
class ShadedPolyFiller(Filler, ShadedPolygon): ...
class PolyFiller(Filler, Polygon): ...
class LinePlot(AbstractLineChart):
reversePlotOrder: int
xValueAxis: Incomplete
yValueAxis: Incomplete
data: Incomplete
lines: Incomplete
lineLabels: Incomplete
lineLabelFormat: Incomplete
lineLabelArray: Incomplete
lineLabelNudge: int
annotations: Incomplete
behindAxes: int
gridFirst: int
def __init__(self) -> None: ...
@property
def joinedLines(self): ...
@joinedLines.setter
def joinedLines(self, v) -> None: ...
def demo(self): ...
def calcPositions(self) -> None: ...
def drawLabel(self, G, rowNo, colNo, x, y) -> None: ...
def makeLines(self): ...
def draw(self): ...
def addCrossHair(self, name, xv, yv, strokeColor=..., strokeWidth: int = 1, beforeLines: bool = True): ...
class LinePlot3D(LinePlot):
theta_x: float
theta_y: float
zDepth: int
zSpace: int
def calcPositions(self) -> None: ...
def makeLines(self): ...
class SimpleTimeSeriesPlot(LinePlot):
xValueAxis: Incomplete
yValueAxis: Incomplete
data: Incomplete
def __init__(self) -> None: ...
class GridLinePlot(SimpleTimeSeriesPlot):
scaleFactor: Incomplete
background: Incomplete
def __init__(self) -> None: ...
def demo(self, drawing: Incomplete | None = None): ...
def draw(self): ...
class AreaLinePlot(LinePlot):
reversePlotOrder: int
data: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class SplitLinePlot(AreaLinePlot):
xValueAxis: Incomplete
yValueAxis: Incomplete
data: Incomplete
def __init__(self) -> None: ...
class ScatterPlot(LinePlot):
width: int
height: int
outerBorderOn: int
outerBorderColor: Incomplete
background: Incomplete
xLabel: str
yLabel: str
data: Incomplete
joinedLines: int
leftPadding: int
rightPadding: int
topPadding: int
bottomPadding: int
x: Incomplete
y: Incomplete
lineLabelFormat: str
lineLabelNudge: int
def __init__(self) -> None: ...
def demo(self, drawing: Incomplete | None = None): ...
def draw(self): ...
def sample1a(): ...
def sample1b(): ...
def sample1c(): ...
def preprocessData(series): ...
def sample2(): ...
def sampleFillPairedData(): ...

View File

@@ -0,0 +1,10 @@
from typing import Final
__version__: Final[str]
def makeEmptySquare(x, y, size, color): ...
def makeFilledSquare(x, y, size, color): ...
def makeFilledDiamond(x, y, size, color): ...
def makeEmptyCircle(x, y, size, color): ...
def makeFilledCircle(x, y, size, color): ...
def makeSmiley(x, y, size, color): ...

View File

@@ -0,0 +1,182 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.areas import PlotArea
from reportlab.graphics.charts.textlabels import Label
from reportlab.graphics.widgetbase import PropHolder
from reportlab.lib.attrmap import *
__version__: Final[str]
class WedgeLabel(Label): ...
class WedgeProperties(PropHolder):
strokeWidth: int
fillColor: Incomplete
strokeColor: Incomplete
strokeDashArray: Incomplete
strokeLineJoin: int
strokeLineCap: int
strokeMiterLimit: int
popout: int
fontName: Incomplete
fontSize: Incomplete
fontColor: Incomplete
labelRadius: float
label_dx: int
label_text: Incomplete
label_topPadding: int
label_boxAnchor: str
label_boxStrokeColor: Incomplete
label_boxStrokeWidth: float
label_boxFillColor: Incomplete
label_strokeColor: Incomplete
label_strokeWidth: float
label_leading: Incomplete
label_textAnchor: str
label_simple_pointer: int
label_visible: int
label_pointer_strokeColor: Incomplete
label_pointer_strokeWidth: float
label_pointer_elbowLength: int
label_pointer_edgePad: int
label_pointer_piePad: int
visible: int
shadingKind: Incomplete
shadingAmount: float
shadingAngle: float
shadingDirection: str
def __init__(self) -> None: ...
class AbstractPieChart(PlotArea):
def makeSwatchSample(self, rowNo, x, y, width, height): ...
def getSeriesName(self, i, default: Incomplete | None = None): ...
def boundsOverlap(P, Q): ...
def findOverlapRun(B, wrap: int = 1): ...
def fixLabelOverlaps(L, sideLabels: bool = False, mult0: float = 1.0) -> None: ...
def intervalIntersection(A, B): ...
def theta0(data, direction): ...
class AngleData(float):
def __new__(cls, angle, data): ...
class Pie(AbstractPieChart):
other_threshold: Incomplete
x: int
y: int
width: int
height: int
data: Incomplete
labels: Incomplete
startAngle: int
direction: str
simpleLabels: int
checkLabelOverlap: int
pointerLabelMode: Incomplete
sameRadii: bool
orderMode: str
xradius: Incomplete
sideLabels: int
sideLabelsOffset: float
slices: Incomplete
def __init__(self, **kwd) -> None: ...
def demo(self): ...
centerx: Incomplete
centery: Incomplete
yradius: Incomplete
lu: Incomplete
ru: Incomplete
def makePointerLabels(self, angles, plMode): ...
def normalizeData(self, keepData: bool = False): ...
def makeAngles(self): ...
def makeWedges(self): ...
def draw(self): ...
class LegendedPie(Pie):
x: int
y: int
height: int
width: int
data: Incomplete
labels: Incomplete
direction: str
pieAndLegend_colors: Incomplete
legendNumberOffset: int
legendNumberFormat: str
legend_data: Incomplete
legend1: Incomplete
legend_names: Incomplete
leftPadding: int
rightPadding: int
topPadding: int
bottomPadding: int
drawLegend: int
def __init__(self) -> None: ...
def draw(self): ...
def demo(self, drawing: Incomplete | None = None): ...
class Wedge3dProperties(PropHolder):
strokeWidth: int
shading: float
visible: int
strokeColorShaded: Incomplete
strokeColor: Incomplete
strokeDashArray: Incomplete
popout: int
fontName: Incomplete
fontSize: Incomplete
fontColor: Incomplete
labelRadius: float
label_dx: int
label_text: Incomplete
label_topPadding: int
label_boxAnchor: str
label_boxStrokeColor: Incomplete
label_boxStrokeWidth: float
label_boxFillColor: Incomplete
label_strokeColor: Incomplete
label_strokeWidth: float
label_leading: Incomplete
label_textAnchor: str
label_visible: int
label_simple_pointer: int
def __init__(self) -> None: ...
class _SL3D:
lo: Incomplete
hi: Incomplete
mid: Incomplete
not360: Incomplete
def __init__(self, lo, hi) -> None: ...
class Pie3d(Pie):
perspective: int
depth_3d: int
angle_3d: int
def CX(self, i, d): ...
def CY(self, i, d): ...
def OX(self, i, o, d): ...
def OY(self, i, o, d): ...
def rad_dist(self, a): ...
slices: Incomplete
xradius: Incomplete
width: int
height: int
data: Incomplete
def __init__(self) -> None: ...
dy: Incomplete
def draw(self): ...
def demo(self): ...
def sample0a(): ...
def sample0b(): ...
def sample1(): ...
def sample2(): ...
def sample3(): ...
def sample4(): ...
def sample5(): ...
def sample6(): ...
def sample7(): ...
def sample8(): ...
def sample9(): ...

View File

@@ -0,0 +1,38 @@
from _typeshed import Incomplete
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
class SlideBox(Widget):
labelFontName: str
labelFontSize: int
labelStrokeColor: Incomplete
labelFillColor: Incomplete
startColor: Incomplete
endColor: Incomplete
numberOfBoxes: int
trianglePosition: int
triangleHeight: Incomplete
triangleWidth: Incomplete
triangleFillColor: Incomplete
triangleStrokeColor: Incomplete
triangleStrokeWidth: float
boxHeight: Incomplete
boxWidth: Incomplete
boxSpacing: Incomplete
boxOutlineColor: Incomplete
boxOutlineWidth: float
leftPadding: int
rightPadding: int
topPadding: int
bottomPadding: int
background: Incomplete
sourceLabelText: str
sourceLabelOffset: Incomplete
sourceLabelFontName: str
sourceLabelFontSize: int
sourceLabelFillColor: Incomplete
def __init__(self) -> None: ...
def demo(self, drawing: Incomplete | None = None): ...
def draw(self): ...

View File

@@ -0,0 +1,60 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.areas import PlotArea
from reportlab.graphics.charts.piecharts import WedgeLabel
from reportlab.graphics.widgetbase import PropHolder
from reportlab.lib.attrmap import *
__version__: Final[str]
class StrandProperty(PropHolder):
strokeWidth: int
fillColor: Incomplete
strokeColor: Incomplete
strokeDashArray: Incomplete
symbol: Incomplete
symbolSize: int
name: Incomplete
def __init__(self) -> None: ...
class SpokeProperty(PropHolder):
strokeWidth: float
fillColor: Incomplete
strokeColor: Incomplete
strokeDashArray: Incomplete
visible: int
labelRadius: float
def __init__(self, **kw) -> None: ...
class SpokeLabel(WedgeLabel):
def __init__(self, **kw) -> None: ...
class StrandLabel(SpokeLabel):
format: str
dR: int
def __init__(self, **kw) -> None: ...
class SpiderChart(PlotArea):
def makeSwatchSample(self, rowNo, x, y, width, height): ...
def getSeriesName(self, i, default: Incomplete | None = None): ...
data: Incomplete
labels: Incomplete
startAngle: int
direction: str
strands: Incomplete
spokes: Incomplete
spokeLabels: Incomplete
strandLabels: Incomplete
x: int
y: int
width: int
height: int
def __init__(self) -> None: ...
def demo(self): ...
def normalizeData(self, outer: float = 0.0): ...
def labelClass(self, kind): ...
def draw(self): ...
def sample1(): ...
def sample2(): ...

View File

@@ -0,0 +1,60 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.charts.utils import CustomDrawChanger
from reportlab.graphics.widgetbase import PropHolder, Widget
from reportlab.lib.attrmap import *
__version__: Final[str]
class Label(Widget):
def __init__(self, **kw) -> None: ...
def setText(self, text) -> None: ...
x: Incomplete
y: Incomplete
def setOrigin(self, x, y) -> None: ...
def demo(self): ...
def computeSize(self) -> None: ...
def draw(self): ...
class LabelDecorator:
textAnchor: str
boxAnchor: str
def __init__(self) -> None: ...
def decorate(self, l, L) -> None: ...
def __call__(self, l) -> None: ...
isOffsetMode: Incomplete
class LabelOffset(PropHolder):
posMode: str
pos: int
def __init__(self) -> None: ...
NoneOrInstanceOfLabelOffset: Incomplete
class PMVLabel(Label):
def __init__(self, **kwds) -> None: ...
class BarChartLabel(PMVLabel):
lineStrokeWidth: int
lineStrokeColor: Incomplete
fixedStart: Incomplete
nudge: int
def __init__(self, **kwds) -> None: ...
class NA_Label(BarChartLabel):
text: str
def __init__(self) -> None: ...
NoneOrInstanceOfNA_Label: Incomplete
class RedNegativeChanger(CustomDrawChanger):
fillColor: Incomplete
def __init__(self, fillColor=...) -> None: ...
class XLabel(Label):
ddfKlass: Incomplete
ddf: Incomplete
def __init__(self, *args, **kwds) -> None: ...
def computeSize(self) -> None: ...

View File

@@ -0,0 +1,49 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
def mkTimeTuple(timeString): ...
def str2seconds(timeString): ...
def seconds2str(seconds): ...
def nextRoundNumber(x): ...
def find_interval(lo, hi, I: int = 5): ...
def find_good_grid(lower, upper, n=(4, 5, 6, 7, 8, 9), grid: Incomplete | None = None): ...
def ticks(
lower, upper, n=(4, 5, 6, 7, 8, 9), split: int = 1, percent: int = 0, grid: Incomplete | None = None, labelVOffset: int = 0
): ...
def findNones(data): ...
def pairFixNones(pairs): ...
def maverage(data, n: int = 6): ...
def pairMaverage(data, n: int = 6): ...
class DrawTimeCollector:
formats: Incomplete
disabled: bool
def __init__(self, formats=["gif"]) -> None: ...
def clear(self) -> None: ...
def record(self, func, node, *args, **kwds) -> None: ...
def __call__(self, node, canvas, renderer) -> None: ...
@staticmethod
def rectDrawTimeCallback(node, canvas, renderer, **kwds): ...
@staticmethod
def transformAndFlatten(A, p): ...
@property
def pmcanv(self): ...
def wedgeDrawTimeCallback(self, node, canvas, renderer, **kwds): ...
def save(self, fnroot) -> None: ...
def xyDist(xxx_todo_changeme, xxx_todo_changeme1): ...
def lineSegmentIntersect(xxx_todo_changeme2, xxx_todo_changeme3, xxx_todo_changeme4, xxx_todo_changeme5): ...
def makeCircularString(
x, y, radius, angle, text, fontName, fontSize, inside: int = 0, G: Incomplete | None = None, textAnchor: str = "start"
): ...
class CustomDrawChanger:
store: Incomplete
def __init__(self) -> None: ...
def __call__(self, change, obj) -> None: ...
class FillPairedData(list[Incomplete]):
other: Incomplete
def __init__(self, v, other: int = 0) -> None: ...

View File

@@ -0,0 +1,26 @@
from _typeshed import Incomplete
class _YStrip:
y0: Incomplete
y1: Incomplete
slope: Incomplete
fillColor: Incomplete
fillColorShaded: Incomplete
def __init__(self, y0, y1, slope, fillColor, fillColorShaded, shading: float = 0.1) -> None: ...
def mod_2pi(radians): ...
class _Segment:
a: Incomplete
b: Incomplete
x0: Incomplete
x1: Incomplete
y0: Incomplete
y1: Incomplete
series: Incomplete
i: Incomplete
s: Incomplete
def __init__(self, s, i, data) -> None: ...
def intersect(self, o, I): ...
def find_intersections(data, small: int = 0): ...

View File

@@ -0,0 +1,37 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.renderbase import Renderer
from reportlab.platypus import Flowable
__version__: Final[str]
def draw(drawing, canvas, x, y, showBoundary=...) -> None: ...
class _PDFRenderer(Renderer):
def __init__(self) -> None: ...
def drawNode(self, node) -> None: ...
def drawRect(self, rect) -> None: ...
def drawImage(self, image) -> None: ...
def drawLine(self, line) -> None: ...
def drawCircle(self, circle) -> None: ...
def drawPolyLine(self, polyline) -> None: ...
def drawWedge(self, wedge) -> None: ...
def drawEllipse(self, ellipse) -> None: ...
def drawPolygon(self, polygon) -> None: ...
def drawString(self, stringObj) -> None: ...
def drawPath(self, path) -> None: ...
def setStrokeColor(self, c) -> None: ...
def setFillColor(self, c) -> None: ...
def applyStateChanges(self, delta, newState) -> None: ...
class GraphicsFlowable(Flowable):
drawing: Incomplete
width: Incomplete
height: Incomplete
def __init__(self, drawing) -> None: ...
def draw(self) -> None: ...
def drawToFile(d, fn, msg: str = "", showBoundary=..., autoSize: int = 1, canvasKwds={}) -> None: ...
def drawToString(d, msg: str = "", showBoundary=..., autoSize: int = 1, canvasKwds={}): ...
def test(outDir: str = "pdfout", shout: bool = False) -> None: ...

View File

@@ -0,0 +1,125 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.renderbase import Renderer
__version__: Final[str]
def Color2Hex(c): ...
def CairoColor(c): ...
def draw(drawing, canvas, x, y, showBoundary=...) -> None: ...
class _PMRenderer(Renderer):
def pop(self) -> None: ...
def push(self, node) -> None: ...
def applyState(self) -> None: ...
def initState(self, x, y) -> None: ...
def drawNode(self, node) -> None: ...
def drawRect(self, rect) -> None: ...
def drawLine(self, line) -> None: ...
def drawImage(self, image) -> None: ...
def drawCircle(self, circle) -> None: ...
def drawPolyLine(self, polyline, _doClose: int = 0) -> None: ...
def drawEllipse(self, ellipse) -> None: ...
def drawPolygon(self, polygon) -> None: ...
def drawString(self, stringObj) -> None: ...
def drawPath(self, path): ...
BEZIER_ARC_MAGIC: float
class PMCanvas:
ctm: Incomplete
def __init__(
self,
w,
h,
dpi: int = 72,
bg: int = 16777215,
configPIL: Incomplete | None = None,
backend: Incomplete | None = None,
backendFmt: str = "RGB",
) -> None: ...
def toPIL(self): ...
def saveToFile(self, fn, fmt: Incomplete | None = None): ...
def saveToString(self, fmt: str = "GIF"): ...
def setFont(self, fontName, fontSize, leading: Incomplete | None = None) -> None: ...
def __setattr__(self, name, value) -> None: ...
def __getattr__(self, name): ...
def fillstrokepath(self, stroke: int = 1, fill: int = 1) -> None: ...
def bezierArcCCW(self, cx, cy, rx, ry, theta0, theta1): ...
def addEllipsoidalArc(self, cx, cy, rx, ry, ang1, ang2) -> None: ...
def drawCentredString(self, x, y, text, text_anchor: str = "middle") -> None: ...
def drawRightString(self, text, x, y) -> None: ...
def drawString(self, x, y, text, _fontInfo: Incomplete | None = None, text_anchor: str = "left") -> None: ...
def line(self, x1, y1, x2, y2) -> None: ...
def rect(self, x, y, width, height, stroke: int = 1, fill: int = 1) -> None: ...
def roundRect(self, x, y, width, height, rx, ry) -> None: ...
def circle(self, cx, cy, r) -> None: ...
def ellipse(self, cx, cy, rx, ry) -> None: ...
def saveState(self) -> None: ...
fillColor: Incomplete
fillOpacity: Incomplete
def setFillColor(self, aColor) -> None: ...
strokeColor: Incomplete
strokeOpacity: Incomplete
def setStrokeColor(self, aColor) -> None: ...
restoreState = saveState
lineCap: Incomplete
def setLineCap(self, cap) -> None: ...
lineJoin: Incomplete
def setLineJoin(self, join) -> None: ...
strokeWidth: Incomplete
def setLineWidth(self, width) -> None: ...
def drawToPMCanvas(
d,
dpi: int = 72,
bg: int = 16777215,
configPIL: Incomplete | None = None,
showBoundary=...,
backend="rlPyCairo",
backendFmt: str = "RGB",
): ...
def drawToPIL(
d,
dpi: int = 72,
bg: int = 16777215,
configPIL: Incomplete | None = None,
showBoundary=...,
backend="rlPyCairo",
backendFmt: str = "RGB",
): ...
def drawToPILP(
d,
dpi: int = 72,
bg: int = 16777215,
configPIL: Incomplete | None = None,
showBoundary=...,
backend="rlPyCairo",
backendFmt: str = "RGB",
): ...
def drawToFile(
d,
fn,
fmt: str = "GIF",
dpi: int = 72,
bg: int = 16777215,
configPIL: Incomplete | None = None,
showBoundary=...,
backend="rlPyCairo",
backendFmt: str = "RGB",
) -> None: ...
def drawToString(
d,
fmt: str = "GIF",
dpi: int = 72,
bg: int = 16777215,
configPIL: Incomplete | None = None,
showBoundary=...,
backend="rlPyCairo",
backendFmt: str = "RGB",
): ...
save = drawToFile
def test(outDir: str = "pmout", shout: bool = False): ...

View File

@@ -0,0 +1,71 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.renderbase import Renderer
__version__: Final[str]
PS_WinAnsiEncoding: Final[str]
class PSCanvas:
comments: int
code: Incomplete
code_append: Incomplete
PostScriptLevel: Incomplete
def __init__(self, size=(300, 300), PostScriptLevel: int = 2) -> None: ...
def comment(self, msg) -> None: ...
def drawImage(self, image, x1, y1, width: Incomplete | None = None, height: Incomplete | None = None) -> None: ...
def clear(self) -> None: ...
def save(self, f: Incomplete | None = None) -> None: ...
def saveState(self) -> None: ...
def restoreState(self) -> None: ...
def stringWidth(self, s, font: Incomplete | None = None, fontSize: Incomplete | None = None): ...
def setLineCap(self, v) -> None: ...
def setLineJoin(self, v) -> None: ...
def setDash(self, array=[], phase: int = 0) -> None: ...
def setStrokeColor(self, color) -> None: ...
def setColor(self, color) -> None: ...
def setFillColor(self, color) -> None: ...
def setFillMode(self, v) -> None: ...
def setLineWidth(self, width) -> None: ...
def setFont(self, font, fontSize, leading: Incomplete | None = None) -> None: ...
def line(self, x1, y1, x2, y2) -> None: ...
def drawString(self, x, y, s, angle: int = 0, text_anchor: str = "left", textRenderMode: int = 0) -> None: ...
def drawCentredString(self, x, y, text, text_anchor: str = "middle", textRenderMode: int = 0) -> None: ...
def drawRightString(self, text, x, y, text_anchor: str = "end", textRenderMode: int = 0) -> None: ...
def drawCurve(self, x1, y1, x2, y2, x3, y3, x4, y4, closed: int = 0) -> None: ...
def rect(self, x1, y1, x2, y2, stroke: int = 1, fill: int = 1) -> None: ...
def roundRect(self, x1, y1, x2, y2, rx: int = 8, ry: int = 8) -> None: ...
def ellipse(self, x1, y1, x2, y2) -> None: ...
def circle(self, xc, yc, r) -> None: ...
def drawArc(self, x1, y1, x2, y2, startAng: int = 0, extent: int = 360, fromcenter: int = 0) -> None: ...
def polygon(self, p, closed: int = 0, stroke: int = 1, fill: int = 1) -> None: ...
def lines(self, lineList, color: Incomplete | None = None, width: Incomplete | None = None) -> None: ...
def moveTo(self, x, y) -> None: ...
def lineTo(self, x, y) -> None: ...
def curveTo(self, x1, y1, x2, y2, x3, y3) -> None: ...
def closePath(self) -> None: ...
def polyLine(self, p) -> None: ...
def drawFigure(self, partList, closed: int = 0) -> None: ...
def translate(self, x, y) -> None: ...
def scale(self, x, y) -> None: ...
def transform(self, a, b, c, d, e, f) -> None: ...
def draw(drawing, canvas, x: int = 0, y: int = 0, showBoundary=0) -> None: ...
class _PSRenderer(Renderer):
def drawNode(self, node) -> None: ...
def drawRect(self, rect) -> None: ...
def drawLine(self, line) -> None: ...
def drawCircle(self, circle) -> None: ...
def drawWedge(self, wedge) -> None: ...
def drawPolyLine(self, p) -> None: ...
def drawEllipse(self, ellipse) -> None: ...
def drawPolygon(self, p) -> None: ...
def drawString(self, stringObj) -> None: ...
def drawPath(self, path, fillMode: Incomplete | None = None): ...
def applyStateChanges(self, delta, newState) -> None: ...
def drawImage(self, image) -> None: ...
def drawToFile(d, fn, showBoundary=0, **kwd) -> None: ...
def drawToString(d, showBoundary=0): ...
def test(outDir: str = "epsout", shout: bool = False) -> None: ...

View File

@@ -0,0 +1,129 @@
from _typeshed import Incomplete
from collections.abc import Sequence
from math import cos as cos, pi as pi, sin as sin
from typing import Final
from reportlab.graphics.renderbase import Renderer
AREA_STYLES: Final[Sequence[str]]
LINE_STYLES: Final[Sequence[str]]
TEXT_STYLES: Final[Sequence[str]]
EXTRA_STROKE_STYLES: Final[Sequence[str]]
EXTRA_FILL_STYLES: Final[Sequence[str]]
def drawToString(d, showBoundary=0, **kwds): ...
def drawToFile(d, fn, showBoundary=0, **kwds) -> None: ...
def draw(drawing, canvas, x: int = 0, y: int = 0, showBoundary=0) -> None: ...
def transformNode(doc, newTag, node: Incomplete | None = None, **attrDict): ...
class EncodedWriter(list[Incomplete]):
BOMS: Incomplete
encoding: Incomplete
def __init__(self, encoding, bom: bool = False) -> None: ...
def write(self, u) -> None: ...
def getvalue(self): ...
def py_fp_str(*args): ...
class SVGCanvas:
verbose: Incomplete
encoding: Incomplete
bom: Incomplete
fontHacks: Incomplete
extraXmlDecl: Incomplete
code: Incomplete
style: Incomplete
path: str
fp_str: Incomplete
cfp_str: Incomplete
doc: Incomplete
svg: Incomplete
groupTree: Incomplete
scaleTree: Incomplete
currGroup: Incomplete
def __init__(self, size=(300, 300), encoding: str = "utf-8", verbose: int = 0, bom: bool = False, **kwds) -> None: ...
def save(self, fn: Incomplete | None = None) -> None: ...
def NOTUSED_stringWidth(self, s, font: Incomplete | None = None, fontSize: Incomplete | None = None): ...
def setLineCap(self, v) -> None: ...
def setLineJoin(self, v) -> None: ...
def setDash(self, array=[], phase: int = 0) -> None: ...
def setStrokeColor(self, color) -> None: ...
def setFillColor(self, color) -> None: ...
def setFillMode(self, v) -> None: ...
def setLineWidth(self, width) -> None: ...
def setFont(self, font, fontSize) -> None: ...
def rect(self, x1, y1, x2, y2, rx: int = 8, ry: int = 8, link_info: Incomplete | None = None, **_svgAttrs) -> None: ...
def roundRect(self, x1, y1, x2, y2, rx: int = 8, ry: int = 8, link_info: Incomplete | None = None, **_svgAttrs) -> None: ...
def drawString(
self,
s,
x,
y,
angle: int = 0,
link_info: Incomplete | None = None,
text_anchor: str = "left",
textRenderMode: int = 0,
**_svgAttrs,
) -> None: ...
def drawCentredString(
self,
s,
x,
y,
angle: int = 0,
text_anchor: str = "middle",
link_info: Incomplete | None = None,
textRenderMode: int = 0,
**_svgAttrs,
) -> None: ...
def drawRightString(
self,
text,
x,
y,
angle: int = 0,
text_anchor: str = "end",
link_info: Incomplete | None = None,
textRenderMode: int = 0,
**_svgAttrs,
) -> None: ...
def comment(self, data) -> None: ...
def drawImage(self, image, x, y, width, height, embed: bool = True) -> None: ...
def line(self, x1, y1, x2, y2) -> None: ...
def ellipse(self, x1, y1, x2, y2, link_info: Incomplete | None = None) -> None: ...
def circle(self, xc, yc, r, link_info: Incomplete | None = None) -> None: ...
def drawCurve(self, x1, y1, x2, y2, x3, y3, x4, y4, closed: int = 0) -> None: ...
def drawArc(self, x1, y1, x2, y2, startAng: int = 0, extent: int = 360, fromcenter: int = 0) -> None: ...
def polygon(self, points, closed: int = 0, link_info: Incomplete | None = None) -> None: ...
def lines(self, lineList, color: Incomplete | None = None, width: Incomplete | None = None) -> None: ...
def polyLine(self, points) -> None: ...
def startGroup(self, attrDict={"transform": ""}): ...
def endGroup(self, currGroup) -> None: ...
def transform(self, a, b, c, d, e, f) -> None: ...
def translate(self, x, y) -> None: ...
def scale(self, sx, sy) -> None: ...
def moveTo(self, x, y) -> None: ...
def lineTo(self, x, y) -> None: ...
def curveTo(self, x1, y1, x2, y2, x3, y3) -> None: ...
def closePath(self) -> None: ...
def saveState(self) -> None: ...
def restoreState(self) -> None: ...
class _SVGRenderer(Renderer):
verbose: int
def __init__(self) -> None: ...
def drawNode(self, node) -> None: ...
def drawGroup(self, group) -> None: ...
def drawRect(self, rect) -> None: ...
def drawString(self, stringObj) -> None: ...
def drawLine(self, line) -> None: ...
def drawCircle(self, circle) -> None: ...
def drawWedge(self, wedge) -> None: ...
def drawPolyLine(self, p) -> None: ...
def drawEllipse(self, ellipse) -> None: ...
def drawPolygon(self, p) -> None: ...
def drawPath(self, path, fillMode=0): ...
def drawImage(self, image) -> None: ...
def applyStateChanges(self, delta, newState) -> None: ...
def test(outDir: str = "out-svg") -> None: ...

View File

@@ -0,0 +1,40 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
def getStateDelta(shape): ...
class StateTracker:
def __init__(self, defaults: Incomplete | None = None, defaultObj: Incomplete | None = None) -> None: ...
def push(self, delta) -> None: ...
def pop(self): ...
def getState(self): ...
def getCTM(self): ...
def __getitem__(self, key): ...
def __setitem__(self, key, value) -> None: ...
def testStateTracker() -> None: ...
def renderScaledDrawing(d): ...
class Renderer:
def undefined(self, operation) -> None: ...
def draw(self, drawing, canvas, x: int = 0, y: int = 0, showBoundary=...) -> None: ...
def initState(self, x, y) -> None: ...
def pop(self) -> None: ...
def drawNode(self, node) -> None: ...
def getStateValue(self, key): ...
def fillDerivedValues(self, node) -> None: ...
def drawNodeDispatcher(self, node) -> None: ...
def drawGroup(self, group) -> None: ...
def drawWedge(self, wedge) -> None: ...
def drawPath(self, path) -> None: ...
def drawRect(self, rect) -> None: ...
def drawLine(self, line) -> None: ...
def drawCircle(self, circle) -> None: ...
def drawPolyLine(self, p) -> None: ...
def drawEllipse(self, ellipse) -> None: ...
def drawPolygon(self, p) -> None: ...
def drawString(self, stringObj) -> None: ...
def applyStateChanges(self, delta, newState) -> None: ...
def drawImage(self, *args, **kwds) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class Bubble(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class ClusteredBar(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class ClusteredColumn(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,33 @@
from _typeshed import Incomplete
color01: Incomplete
color02: Incomplete
color03: Incomplete
color04: Incomplete
color05: Incomplete
color06: Incomplete
color07: Incomplete
color08: Incomplete
color09: Incomplete
color10: Incomplete
color01Light: Incomplete
color02Light: Incomplete
color03Light: Incomplete
color04Light: Incomplete
color05Light: Incomplete
color06Light: Incomplete
color07Light: Incomplete
color08Light: Incomplete
color09Light: Incomplete
color10Light: Incomplete
color01Dark: Incomplete
color02Dark: Incomplete
color03Dark: Incomplete
color04Dark: Incomplete
color05Dark: Incomplete
color06Dark: Incomplete
color07Dark: Incomplete
color08Dark: Incomplete
color09Dark: Incomplete
color10Dark: Incomplete
backgroundGrey: Incomplete

View File

@@ -0,0 +1,8 @@
from _typeshed import Incomplete
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class ExplodedPie(_DrawingEditorMixin, Drawing):
background: Incomplete
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class FilledRadarChart(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class LineChart(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class LineChartWithMarkers(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class RadarChart(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,3 @@
def moduleClasses(mod): ...
def getclass(f): ...
def run(format, VERBOSE: int = 0) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class Scatter(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class ScatterLines(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class ScatterLinesMarkers(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,8 @@
from _typeshed import Incomplete
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class SimplePie(_DrawingEditorMixin, Drawing):
background: Incomplete
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class StackedBar(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,5 @@
from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
class StackedColumn(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 200, height: int = 150, *args, **kw) -> None: ...

View File

@@ -0,0 +1,253 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
from reportlab.platypus import Flowable
from .transform import *
__version__: Final[str]
isOpacity: NoneOr
NON_ZERO_WINDING: Final[str]
EVEN_ODD: Final[str]
STATE_DEFAULTS: Final[Incomplete]
class _DrawTimeResizeable: ...
class _SetKeyWordArgs:
def __init__(self, keywords={}) -> None: ...
def getRectsBounds(rectList): ...
def getPathBounds(points): ...
def getPointsBounds(pointList): ...
class Shape(_SetKeyWordArgs, _DrawTimeResizeable):
def copy(self) -> None: ...
def getProperties(self, recur: int = 1): ...
def setProperties(self, props) -> None: ...
def dumpProperties(self, prefix: str = "") -> None: ...
def verify(self) -> None: ...
def __setattr__(self, attr, value) -> None: ...
def getBounds(self) -> None: ...
class Group(Shape):
contents: Incomplete
transform: Incomplete
def __init__(self, *elements, **keywords) -> None: ...
def add(self, node, name: Incomplete | None = None) -> None: ...
def insert(self, i, n, name: Incomplete | None = None) -> None: ...
def expandUserNodes(self): ...
def copy(self): ...
def rotate(self, theta) -> None: ...
def translate(self, dx, dy) -> None: ...
def scale(self, sx, sy) -> None: ...
def skew(self, kx, ky) -> None: ...
def shift(self, x, y) -> None: ...
__class__: Incomplete
width: Incomplete
height: Incomplete
def asDrawing(self, width, height) -> None: ...
def getContents(self): ...
def getBounds(self): ...
class Drawing(Group, Flowable):
background: Incomplete
renderScale: float
def __init__(self, width: int = 400, height: int = 200, *nodes, **keywords) -> None: ...
def draw(self, showBoundary=...) -> None: ...
def wrap(self, availWidth, availHeight): ...
def expandUserNodes(self): ...
def copy(self): ...
def asGroup(self, *args, **kw): ...
def save(
self,
formats: Incomplete | None = None,
verbose: Incomplete | None = None,
fnRoot: Incomplete | None = None,
outDir: Incomplete | None = None,
title: str = "",
**kw,
): ...
def asString(self, format, verbose: Incomplete | None = None, preview: int = 0, **kw): ...
def resized(self, kind: str = "fit", lpad: int = 0, rpad: int = 0, bpad: int = 0, tpad: int = 0): ...
class _DrawingEditorMixin: ...
class _isStrokeDashArray(Validator):
def test(self, x): ...
isStrokeDashArray: _isStrokeDashArray
class LineShape(Shape):
strokeColor: Incomplete
strokeWidth: int
strokeLineCap: int
strokeLineJoin: int
strokeMiterLimit: int
strokeDashArray: Incomplete
strokeOpacity: Incomplete
def __init__(self, kw) -> None: ...
class Line(LineShape):
x1: Incomplete
y1: Incomplete
x2: Incomplete
y2: Incomplete
def __init__(self, x1, y1, x2, y2, **kw) -> None: ...
def getBounds(self): ...
class SolidShape(LineShape):
fillColor: Incomplete
fillOpacity: Incomplete
def __init__(self, kw) -> None: ...
class Path(SolidShape):
points: Incomplete
operators: Incomplete
isClipPath: Incomplete
autoclose: Incomplete
fillMode: Incomplete
def __init__(
self,
points: Incomplete | None = None,
operators: Incomplete | None = None,
isClipPath: int = 0,
autoclose: Incomplete | None = None,
fillMode=0,
**kw,
) -> None: ...
def copy(self): ...
def moveTo(self, x, y) -> None: ...
def lineTo(self, x, y) -> None: ...
def curveTo(self, x1, y1, x2, y2, x3, y3) -> None: ...
def closePath(self) -> None: ...
def getBounds(self): ...
EmptyClipPath: Incomplete
def getArcPoints(
centerx,
centery,
radius,
startangledegrees,
endangledegrees,
yradius: Incomplete | None = None,
degreedelta: Incomplete | None = None,
reverse: Incomplete | None = None,
): ...
class ArcPath(Path):
def addArc(
self,
centerx,
centery,
radius,
startangledegrees,
endangledegrees,
yradius: Incomplete | None = None,
degreedelta: Incomplete | None = None,
moveTo: Incomplete | None = None,
reverse: Incomplete | None = None,
) -> None: ...
def definePath(pathSegs=[], isClipPath: int = 0, dx: int = 0, dy: int = 0, **kw): ...
class Rect(SolidShape):
x: Incomplete
y: Incomplete
width: Incomplete
height: Incomplete
rx: Incomplete
ry: Incomplete
def __init__(self, x, y, width, height, rx: int = 0, ry: int = 0, **kw) -> None: ...
def copy(self): ...
def getBounds(self): ...
class Image(SolidShape):
x: Incomplete
y: Incomplete
width: Incomplete
height: Incomplete
path: Incomplete
def __init__(self, x, y, width, height, path, **kw) -> None: ...
def copy(self): ...
def getBounds(self): ...
class Circle(SolidShape):
cx: Incomplete
cy: Incomplete
r: Incomplete
def __init__(self, cx, cy, r, **kw) -> None: ...
def copy(self): ...
def getBounds(self): ...
class Ellipse(SolidShape):
cx: Incomplete
cy: Incomplete
rx: Incomplete
ry: Incomplete
def __init__(self, cx, cy, rx, ry, **kw) -> None: ...
def copy(self): ...
def getBounds(self): ...
class Wedge(SolidShape):
degreedelta: int
yradius: Incomplete
annular: Incomplete
def __init__(
self,
centerx,
centery,
radius,
startangledegrees,
endangledegrees,
yradius: Incomplete | None = None,
annular: bool = False,
**kw,
) -> None: ...
def asPolygon(self): ...
def copy(self): ...
def getBounds(self): ...
class Polygon(SolidShape):
points: Incomplete
def __init__(self, points=[], **kw) -> None: ...
def copy(self): ...
def getBounds(self): ...
class PolyLine(LineShape):
points: Incomplete
def __init__(self, points=[], **kw) -> None: ...
def copy(self): ...
def getBounds(self): ...
class Hatching(Path):
xyLists: Incomplete
angles: Incomplete
spacings: Incomplete
def __init__(self, spacings: int = 2, angles: int = 45, xyLists=[], **kwds) -> None: ...
def numericXShift(tA, text, w, fontName, fontSize, encoding: Incomplete | None = None, pivotCharacter="."): ...
class String(Shape):
encoding: str
x: Incomplete
y: Incomplete
text: Incomplete
textAnchor: str
fontName: Incomplete
fontSize: Incomplete
fillColor: Incomplete
def __init__(self, x, y, text, **kw) -> None: ...
def getEast(self): ...
def copy(self): ...
def getBounds(self): ...
class UserNode(_DrawTimeResizeable):
def provideNode(self) -> None: ...
class DirectDraw(Shape):
def drawDirectly(self, canvas) -> None: ...
def test() -> None: ...

View File

@@ -0,0 +1,8 @@
from _typeshed import Incomplete
from .shapes import Path, UserNode
class SvgPath(Path, UserNode):
fillColor: Incomplete
def __init__(self, s, isClipPath: int = 0, autoclose: Incomplete | None = None, fillMode=0, **kw) -> None: ...
def provideNode(self): ...

View File

@@ -0,0 +1,12 @@
def nullTransform(): ...
def translate(dx, dy): ...
def scale(sx, sy): ...
def rotate(angle): ...
def skewX(angle): ...
def skewY(angle): ...
def mmult(A, B): ...
def inverse(A): ...
def zTransformPoint(A, v): ...
def transformPoint(A, v): ...
def transformPoints(matrix, V): ...
def zTransformPoints(matrix, V): ...

View File

@@ -0,0 +1,22 @@
from _typeshed import Incomplete
class RenderPMError(Exception): ...
def setFont(gs, fontName, fontSize) -> None: ...
def pathNumTrunc(n): ...
def text2Path(
text,
x: int = 0,
y: int = 0,
fontName="Times-Roman",
fontSize: int = 1000,
anchor: str = "start",
truncate: int = 1,
pathReverse: int = 0,
gs: Incomplete | None = None,
**kwds,
): ...
# NOTE: This only exists on some render backends
def processGlyph(G, truncate=1, pathReverse=0): ...
def text2PathDescription(text, x=0, y=0, fontName=..., fontSize=1000, anchor="start", truncate=1, pathReverse=0, gs=None): ...

View File

@@ -0,0 +1,111 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics import shapes
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
__version__: Final[str]
class PropHolder:
def verify(self) -> None: ...
def __setattr__(self, name, value) -> None: ...
def getProperties(self, recur: int = 1): ...
def setProperties(self, propDict) -> None: ...
def dumpProperties(self, prefix: str = "") -> None: ...
class Widget(PropHolder, shapes.UserNode):
def draw(self) -> None: ...
def demo(self) -> None: ...
def provideNode(self): ...
def getBounds(self): ...
class ScaleWidget(Widget):
x: Incomplete
y: Incomplete
contents: Incomplete
scale: Incomplete
def __init__(self, x: int = 0, y: int = 0, scale: float = 1.0, contents: Incomplete | None = None) -> None: ...
def draw(self): ...
class CloneMixin:
def clone(self, **kwds): ...
class TypedPropertyCollection(PropHolder):
def __init__(self, exampleClass, **kwds) -> None: ...
def wKlassFactory(self, Klass): ...
def __getitem__(self, x): ...
def __contains__(self, key) -> bool: ...
def __setitem__(self, key, value) -> None: ...
def __len__(self) -> int: ...
def getProperties(self, recur: int = 1): ...
def setVector(self, **kw) -> None: ...
def __getattr__(self, name): ...
def __setattr__(self, name, value): ...
def checkAttr(self, key, a, default: Incomplete | None = None): ...
def tpcGetItem(obj, x): ...
def isWKlass(obj): ...
class StyleProperties(PropHolder):
def __init__(self, **kwargs) -> None: ...
def __setattr__(self, name, value) -> None: ...
class TwoCircles(Widget):
leftCircle: Incomplete
rightCircle: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class Face(Widget):
x: int
y: int
size: int
skinColor: Incomplete
eyeColor: Incomplete
mood: str
def __init__(self) -> None: ...
def demo(self) -> None: ...
def draw(self): ...
class TwoFaces(Widget):
faceOne: Incomplete
faceTwo: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
def demo(self) -> None: ...
class Sizer(Widget):
contents: Incomplete
fillColor: Incomplete
strokeColor: Incomplete
def __init__(self, *elements) -> None: ...
def add(self, node, name: Incomplete | None = None) -> None: ...
def getBounds(self): ...
def draw(self): ...
class CandleStickProperties(PropHolder):
strokeWidth: Incomplete
strokeColor: Incomplete
strokeDashArray: Incomplete
crossWidth: Incomplete
crossLo: Incomplete
crossHi: Incomplete
boxWidth: Incomplete
boxFillColor: Incomplete
boxStrokeColor: Incomplete
boxStrokeWidth: Incomplete
boxStrokeDashArray: Incomplete
boxLo: Incomplete
boxMid: Incomplete
boxHi: Incomplete
boxSides: Incomplete
position: Incomplete
candleKind: Incomplete
axes: Incomplete
chart: Incomplete
def __init__(self, **kwds) -> None: ...
def __call__(self, _x, _y, _size, _color): ...
def CandleSticks(**kwds): ...
def test() -> None: ...

View File

@@ -0,0 +1,3 @@
from typing import Final
__version__: Final[str]

View File

@@ -0,0 +1,11 @@
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
class AdjustableArrow(Widget):
def __init__(self, **kwds) -> None: ...
def draw(self): ...
class AdjustableArrowDrawing(_DrawingEditorMixin, Drawing):
def __init__(self, width: int = 100, height: int = 63, *args, **kw) -> None: ...

View File

@@ -0,0 +1,29 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
__version__: Final[str]
class EventCalendar(Widget):
x: int
y: int
width: int
height: int
timeColWidth: Incomplete
trackRowHeight: int
data: Incomplete
trackNames: Incomplete
startTime: Incomplete
endTime: Incomplete
day: int
def __init__(self) -> None: ...
def computeSize(self) -> None: ...
def computeStartAndEndTimes(self) -> None: ...
def getAllTracks(self): ...
def getRelevantTalks(self, talkList): ...
def scaleTime(self, theTime): ...
def getTalkRect(self, startTime, duration, trackId, text): ...
def draw(self): ...
def test() -> None: ...

View File

@@ -0,0 +1,32 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgets.signsandsymbols import _Symbol
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
__version__: Final[str]
validFlag: Incomplete
class Star(_Symbol):
size: int
fillColor: Incomplete
strokeColor: Incomplete
angle: int
def __init__(self) -> None: ...
def demo(self): ...
def draw(self): ...
class Flag(_Symbol):
kind: Incomplete
size: int
fillColor: Incomplete
border: int
def __init__(self, **kw) -> None: ...
def availableFlagNames(self): ...
def draw(self): ...
def clone(self): ...
def demo(self): ...
def makeFlag(name): ...
def test() -> None: ...

View File

@@ -0,0 +1,74 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.shapes import LineShape
from reportlab.graphics.widgetbase import Widget
__version__: Final[str]
def frange(start, end: Incomplete | None = None, inc: Incomplete | None = None): ...
def makeDistancesList(list): ...
class Grid(Widget):
x: int
y: int
width: int
height: int
orientation: str
useLines: int
useRects: int
delta: int
delta0: int
deltaSteps: Incomplete
fillColor: Incomplete
stripeColors: Incomplete
strokeColor: Incomplete
strokeWidth: int
def __init__(self) -> None: ...
def demo(self): ...
def makeOuterRect(self): ...
def makeLinePosList(self, start, isX: int = 0): ...
def makeInnerLines(self): ...
def makeInnerTiles(self): ...
def draw(self): ...
class DoubleGrid(Widget):
x: int
y: int
width: int
height: int
grid0: Incomplete
grid1: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def draw(self): ...
class ShadedRect(Widget):
x: int
y: int
width: int
height: int
orientation: str
numShades: int
fillColorStart: Incomplete
fillColorEnd: Incomplete
strokeColor: Incomplete
strokeWidth: int
cylinderMode: int
def __init__(self, **kw) -> None: ...
def demo(self): ...
def draw(self): ...
def colorRange(c0, c1, n): ...
def centroid(P): ...
def rotatedEnclosingRect(P, angle, rect): ...
class ShadedPolygon(Widget, LineShape):
angle: int
fillColorStart: Incomplete
fillColorEnd: Incomplete
cylinderMode: int
numShades: int
points: Incomplete
def __init__(self, **kw) -> None: ...
def draw(self): ...

View File

@@ -0,0 +1,21 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.validators import Validator
__version__: Final[str]
class Marker(Widget):
def __init__(self, *args, **kw) -> None: ...
def clone(self, **kwds): ...
def draw(self): ...
def uSymbol2Symbol(uSymbol, x, y, color): ...
class _isSymbol(Validator):
def test(self, x): ...
isSymbol: Incomplete
def makeMarker(name, **kw): ...

View File

@@ -0,0 +1,164 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
__version__: Final[str]
class _Symbol(Widget):
x: int
size: int
fillColor: Incomplete
strokeColor: Incomplete
strokeWidth: float
def __init__(self) -> None: ...
def demo(self): ...
class ETriangle(_Symbol):
def __init__(self) -> None: ...
def draw(self): ...
class RTriangle(_Symbol):
x: int
y: int
size: int
fillColor: Incomplete
strokeColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class Octagon(_Symbol):
x: int
y: int
size: int
fillColor: Incomplete
strokeColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class Crossbox(_Symbol):
x: int
y: int
size: int
fillColor: Incomplete
crossColor: Incomplete
strokeColor: Incomplete
crosswidth: int
def __init__(self) -> None: ...
def draw(self): ...
class Tickbox(_Symbol):
x: int
y: int
size: int
tickColor: Incomplete
strokeColor: Incomplete
fillColor: Incomplete
tickwidth: int
def __init__(self) -> None: ...
def draw(self): ...
class SmileyFace(_Symbol):
x: int
y: int
size: int
fillColor: Incomplete
strokeColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class StopSign(_Symbol):
x: int
y: int
size: int
strokeColor: Incomplete
fillColor: Incomplete
stopColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class NoEntry(_Symbol):
x: int
y: int
size: int
strokeColor: Incomplete
fillColor: Incomplete
innerBarColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class NotAllowed(_Symbol):
x: int
y: int
size: int
strokeColor: Incomplete
fillColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class NoSmoking(NotAllowed):
def __init__(self) -> None: ...
def draw(self): ...
class DangerSign(_Symbol):
x: int
y: int
size: int
strokeColor: Incomplete
fillColor: Incomplete
strokeWidth: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class YesNo(_Symbol):
x: int
y: int
size: int
tickcolor: Incomplete
crosscolor: Incomplete
testValue: int
def __init__(self) -> None: ...
def draw(self): ...
def demo(self): ...
class FloppyDisk(_Symbol):
x: int
y: int
size: int
diskColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class ArrowOne(_Symbol):
x: int
y: int
size: int
fillColor: Incomplete
strokeWidth: int
strokeColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class ArrowTwo(ArrowOne):
x: int
y: int
size: int
fillColor: Incomplete
strokeWidth: int
strokeColor: Incomplete
def __init__(self) -> None: ...
def draw(self): ...
class CrossHair(_Symbol):
x: int
size: int
fillColor: Incomplete
strokeColor: Incomplete
strokeWidth: float
innerGap: str
def __init__(self) -> None: ...
def draw(self): ...
def test() -> None: ...

View File

@@ -0,0 +1,32 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
__version__: Final[str]
class TableWidget(Widget):
x: Incomplete
y: Incomplete
width: int
height: int
borderStrokeColor: Incomplete
fillColor: Incomplete
borderStrokeWidth: float
horizontalDividerStrokeColor: Incomplete
verticalDividerStrokeColor: Incomplete
horizontalDividerStrokeWidth: float
verticalDividerStrokeWidth: float
dividerDashArray: Incomplete
data: Incomplete
boxAnchor: str
fontSize: int
fontColor: Incomplete
alignment: str
textAnchor: str
def __init__(self, x: int = 10, y: int = 10, **kw) -> None: ...
def demo(self): ...
def draw(self): ...
def preProcessData(self, data): ...

View File

@@ -0,0 +1,21 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
def replace(src, sep, rep): ...
keywordsList: Incomplete
commentPat: str
pat: str
quotePat: Incomplete
tripleQuotePat: Incomplete
nonKeyPat: str
keyPat: Incomplete
matchPat: Incomplete
matchRE: Incomplete
idKeyPat: str
idRE: Incomplete
def fontify(pytext, searchfrom: int = 0, searchto: Incomplete | None = None): ...
def test(path) -> None: ...

View File

@@ -0,0 +1,4 @@
from typing import Final
__version__: Final[str]
RL_DEBUG: Final[bool] # initalized based on env

View File

@@ -0,0 +1,11 @@
from typing import Any, Final
from typing_extensions import Self
__version__: Final[str]
class ABag:
def __init__(self, **attr: Any) -> None: ...
def clone(self, **attr: Any) -> Self: ...
# ABag can have arbitrary attributes
def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...

View File

@@ -0,0 +1,7 @@
class ArcIV:
def __init__(self, key) -> None: ...
def reset(self) -> None: ...
def encode(self, S): ...
def encode(text, key): ...
def decode(text, key): ...

View File

@@ -0,0 +1,40 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
class CallableValue:
func: Incomplete
args: Incomplete
kw: Incomplete
def __init__(self, func, *args, **kw) -> None: ...
def __call__(self): ...
class AttrMapValue:
validate: Incomplete
desc: Incomplete
def __init__(
self,
validate: Incomplete | None = None,
desc: Incomplete | None = None,
initial: Incomplete | None = None,
advancedUsage: int = 0,
**kw,
) -> None: ...
def __getattr__(self, name): ...
class AttrMap(dict[str, AttrMapValue]):
def __init__(self, BASE: Incomplete | None = None, UNWANTED=[], **kw) -> None: ...
def remove(self, unwanted) -> None: ...
def clone(self, UNWANTED=[], **kw): ...
def validateSetattr(obj, name, value) -> None: ...
def hook__setattr__(obj): ...
def addProxyAttribute(
src,
name,
validate: Incomplete | None = None,
desc: Incomplete | None = None,
initial: Incomplete | None = None,
dst: Incomplete | None = None,
) -> None: ...

View File

@@ -0,0 +1,6 @@
from typing import Final
__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): ...

View File

@@ -0,0 +1,80 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
from reportlab.platypus import Flowable
__version__: Final[str]
adobe2codec: Incomplete
class CodeChartBase(Flowable):
rows: Incomplete
width: Incomplete
height: Incomplete
ylist: Incomplete
xlist: Incomplete
def calcLayout(self) -> None: ...
def formatByte(self, byt): ...
def drawChars(self, charList) -> None: ...
def drawLabels(self, topLeft: str = "") -> None: ...
class SingleByteEncodingChart(CodeChartBase):
codePoints: int
faceName: Incomplete
encodingName: Incomplete
fontName: Incomplete
charsPerRow: Incomplete
boxSize: Incomplete
hex: Incomplete
rowLabels: Incomplete
def __init__(
self,
faceName: str = "Helvetica",
encodingName: str = "WinAnsiEncoding",
charsPerRow: int = 16,
boxSize: int = 14,
hex: int = 1,
) -> None: ...
def draw(self): ...
class KutenRowCodeChart(CodeChartBase):
row: Incomplete
codePoints: int
boxSize: int
charsPerRow: int
rows: int
rowLabels: Incomplete
hex: int
faceName: Incomplete
encodingName: Incomplete
fontName: Incomplete
def __init__(self, row, faceName, encodingName) -> None: ...
def makeRow(self, row): ...
def draw(self) -> None: ...
class Big5CodeChart(CodeChartBase):
row: Incomplete
codePoints: int
boxSize: int
charsPerRow: int
rows: int
hex: int
faceName: Incomplete
encodingName: Incomplete
rowLabels: Incomplete
fontName: Incomplete
def __init__(self, row, faceName, encodingName) -> None: ...
def makeRow(self, row): ...
def draw(self) -> None: ...
def hBoxText(msg, canvas, x, y, fontName) -> None: ...
class CodeWidget(Widget):
x: int
y: int
width: int
height: int
def __init__(self) -> None: ...
def draw(self): ...
def test() -> None: ...

View File

@@ -0,0 +1,318 @@
from collections.abc import Iterable, Iterator
from typing import Final, Literal, TypeVar, overload
from typing_extensions import Self, TypeAlias
_ColorT = TypeVar("_ColorT", bound=Color)
# NOTE: Reportlab is very inconsistent and sometimes uses the interpretation
# used in reportlab.pdfgen.textobject instead, so we pick a different name
_ConvertibleToColor: TypeAlias = Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float] | str | int
__version__: Final[str]
class Color:
red: float
green: float
blue: float
alpha: float
def __init__(self, red: float = 0, green: float = 0, blue: float = 0, alpha: float = 1) -> None: ...
@property
def __key__(self) -> tuple[float, ...]: ...
def __hash__(self) -> int: ...
def __comparable__(self, other: object) -> bool: ...
def __lt__(self, other: object) -> bool: ...
def __eq__(self, other: object) -> bool: ...
def __le__(self, other: object) -> bool: ...
def __gt__(self, other: object) -> bool: ...
def __ge__(self, other: object) -> bool: ...
def rgb(self) -> tuple[float, float, float]: ...
def rgba(self) -> tuple[float, float, float, float]: ...
def bitmap_rgb(self) -> tuple[int, int, int]: ...
def bitmap_rgba(self) -> tuple[int, int, int, int]: ...
def hexval(self) -> str: ...
def hexvala(self) -> str: ...
def int_rgb(self) -> int: ...
def int_rgba(self) -> int: ...
def int_argb(self) -> int: ...
@property
def cKwds(self) -> Iterator[tuple[str, int]]: ...
# NOTE: Possible arguments depend on __init__, so this violates LSP
# For now we just leave it unchecked
def clone(self, **kwds) -> Self: ...
@property
def normalizedAlpha(self) -> float: ...
def opaqueColor(c: object) -> bool: ...
class CMYKColor(Color):
cyan: float
magenta: float
yellow: float
black: float
spotName: str | None
density: float
knockout: bool | None
alpha: float
def __init__(
self,
cyan: float = 0,
magenta: float = 0,
yellow: float = 0,
black: float = 0,
spotName: str | None = None,
density: float = 1,
knockout: bool | None = None,
alpha: float = 1,
) -> None: ...
def fader(self, n: int, reverse: bool = False) -> list[Self]: ...
def cmyk(self) -> tuple[float, float, float, float]: ...
def cmyka(self) -> tuple[float, float, float, float, float]: ...
class PCMYKColor(CMYKColor):
def __init__(
self,
cyan: float,
magenta: float,
yellow: float,
black: float,
density: float = 100,
spotName: str | None = None,
knockout: bool | None = None,
alpha: float = 100,
) -> None: ...
class CMYKColorSep(CMYKColor):
def __init__(
self,
cyan: float = 0,
magenta: float = 0,
yellow: float = 0,
black: float = 0,
spotName: str | None = None,
density: float = 1,
alpha: float = 1,
) -> None: ...
class PCMYKColorSep(PCMYKColor, CMYKColorSep):
def __init__(
self,
cyan: float = 0,
magenta: float = 0,
yellow: float = 0,
black: float = 0,
spotName: str | None = None,
density: float = 100,
alpha: float = 100,
) -> None: ...
def cmyk2rgb(cmyk: tuple[float, float, float, float], density: float = 1) -> tuple[float, float, float]: ...
def rgb2cmyk(r: float, g: float, b: float) -> tuple[float, float, float, float]: ...
def color2bw(colorRGB: Color) -> Color: ...
def HexColor(val: str | int, htmlOnly: bool = False, hasAlpha: bool = False) -> Color: ...
def linearlyInterpolatedColor(c0: _ColorT, c1: _ColorT, x0: float, x1: float, x: float) -> _ColorT: ...
@overload
def obj_R_G_B(
c: Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float]
) -> tuple[float, float, float]: ...
@overload
def obj_R_G_B(c: None) -> None: ...
transparent: Color
ReportLabBlueOLD: Color
ReportLabBlue: Color
ReportLabBluePCMYK: Color
ReportLabLightBlue: Color
ReportLabFidBlue: Color
ReportLabFidRed: Color
ReportLabGreen: Color
ReportLabLightGreen: Color
aliceblue: Color
antiquewhite: Color
aqua: Color
aquamarine: Color
azure: Color
beige: Color
bisque: Color
black: Color
blanchedalmond: Color
blue: Color
blueviolet: Color
brown: Color
burlywood: Color
cadetblue: Color
chartreuse: Color
chocolate: Color
coral: Color
cornflowerblue: Color
cornflower: Color
cornsilk: Color
crimson: Color
cyan: Color
darkblue: Color
darkcyan: Color
darkgoldenrod: Color
darkgray: Color
darkgrey: Color
darkgreen: Color
darkkhaki: Color
darkmagenta: Color
darkolivegreen: Color
darkorange: Color
darkorchid: Color
darkred: Color
darksalmon: Color
darkseagreen: Color
darkslateblue: Color
darkslategray: Color
darkslategrey: Color
darkturquoise: Color
darkviolet: Color
deeppink: Color
deepskyblue: Color
dimgray: Color
dimgrey: Color
dodgerblue: Color
firebrick: Color
floralwhite: Color
forestgreen: Color
fuchsia: Color
gainsboro: Color
ghostwhite: Color
gold: Color
goldenrod: Color
gray: Color
grey: Color
green: Color
greenyellow: Color
honeydew: Color
hotpink: Color
indianred: Color
indigo: Color
ivory: Color
khaki: Color
lavender: Color
lavenderblush: Color
lawngreen: Color
lemonchiffon: Color
lightblue: Color
lightcoral: Color
lightcyan: Color
lightgoldenrodyellow: Color
lightgreen: Color
lightgrey: Color
lightpink: Color
lightsalmon: Color
lightseagreen: Color
lightskyblue: Color
lightslategray: Color
lightslategrey: Color
lightsteelblue: Color
lightyellow: Color
lime: Color
limegreen: Color
linen: Color
magenta: Color
maroon: Color
mediumaquamarine: Color
mediumblue: Color
mediumorchid: Color
mediumpurple: Color
mediumseagreen: Color
mediumslateblue: Color
mediumspringgreen: Color
mediumturquoise: Color
mediumvioletred: Color
midnightblue: Color
mintcream: Color
mistyrose: Color
moccasin: Color
navajowhite: Color
navy: Color
oldlace: Color
olive: Color
olivedrab: Color
orange: Color
orangered: Color
orchid: Color
palegoldenrod: Color
palegreen: Color
paleturquoise: Color
palevioletred: Color
papayawhip: Color
peachpuff: Color
peru: Color
pink: Color
plum: Color
powderblue: Color
purple: Color
red: Color
rosybrown: Color
royalblue: Color
saddlebrown: Color
salmon: Color
sandybrown: Color
seagreen: Color
seashell: Color
sienna: Color
silver: Color
skyblue: Color
slateblue: Color
slategray: Color
slategrey: Color
snow: Color
springgreen: Color
steelblue: Color
tan: Color
teal: Color
thistle: Color
tomato: Color
turquoise: Color
violet: Color
wheat: Color
white: Color
whitesmoke: Color
yellow: Color
yellowgreen: Color
fidblue: Color
fidred: Color
fidlightblue: Color
ColorType: type[Color]
def colorDistance(col1: Color, col2: Color) -> float: ...
def cmykDistance(col1: Color, col2: Color) -> float: ...
def getAllNamedColors() -> dict[str, Color]: ...
@overload
def describe(aColor: Color, mode: Literal[0] = 0) -> None: ...
@overload
def describe(aColor: Color, mode: Literal[1]) -> str: ...
@overload
def describe(aColor: Color, mode: Literal[2]) -> tuple[str, float]: ...
def hue2rgb(m1: float, m2: float, h: float) -> float: ...
def hsl2rgb(h: float, s: float, l: float) -> tuple[float, float, float]: ...
class _cssParse:
def pcVal(self, v: str) -> float: ...
def rgbPcVal(self, v: str) -> float: ...
def rgbVal(self, v: str) -> float: ...
def hueVal(self, v: str) -> float: ...
def alphaVal(self, v: str, c: float = 1, n: str = "alpha") -> float: ...
s: str
def __call__(self, s: str) -> Color: ...
cssParse: _cssParse
class _toColor:
extraColorsNS: dict[str, Color]
def __init__(self) -> None: ...
def setExtraColorsNameSpace(self, NS: dict[str, Color]) -> None: ...
def __call__(self, arg: _ConvertibleToColor, default: Color | None = None) -> Color: ...
toColor: _toColor
@overload
def toColorOrNone(arg: None, default: Color | None) -> None: ...
@overload
def toColorOrNone(arg: _ConvertibleToColor, default: Color | None = None) -> Color: ...
def setColors(**kw: _ConvertibleToColor) -> None: ...
def Whiter(c: _ColorT, f: float) -> _ColorT: ...
def Blacker(c: _ColorT, f: float) -> _ColorT: ...
def fade(aSpotColor: CMYKColor, percentages: Iterable[float]) -> list[CMYKColor]: ...

View File

@@ -0,0 +1,79 @@
from _typeshed import Incomplete
from typing import Final
from reportlab.graphics.widgetbase import Widget
from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
__version__: Final[str]
class RL_CorpLogo(Widget):
fillColor: Incomplete
strokeColor: Incomplete
strokeWidth: float
background: Incomplete
border: Incomplete
borderWidth: int
shadow: float
height: int
width: int
x: int
skewX: int
showPage: int
oColors: Incomplete
pageColors: Incomplete
prec: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
@staticmethod
def applyPrec(P, prec): ...
def draw(self): ...
class RL_CorpLogoReversed(RL_CorpLogo):
background: Incomplete
fillColor: Incomplete
def __init__(self) -> None: ...
class RL_CorpLogoThin(Widget):
fillColor: Incomplete
strokeColor: Incomplete
x: int
y: int
height: Incomplete
width: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def draw(self): ...
class ReportLabLogo:
origin: Incomplete
dimensions: Incomplete
powered_by: Incomplete
def __init__(self, atx: int = 0, aty: int = 0, width=180.0, height=108.0, powered_by: int = 0) -> None: ...
def draw(self, canvas) -> None: ...
class RL_BusinessCard(Widget):
fillColor: Incomplete
strokeColor: Incomplete
altStrokeColor: Incomplete
x: int
y: int
height: Incomplete
width: Incomplete
borderWidth: Incomplete
bleed: Incomplete
cropMarks: int
border: int
name: str
position: str
telephone: str
mobile: str
fax: str
email: str
web: str
rh_blurb_top: Incomplete
def __init__(self) -> None: ...
def demo(self): ...
def draw(self): ...
def test(formats=["pdf", "eps", "jpg", "gif", "svg"]) -> None: ...

View File

@@ -0,0 +1,7 @@
from typing import Final
__version__: Final[str]
TA_LEFT: Final = 0
TA_CENTER: Final = 1
TA_RIGHT: Final = 2
TA_JUSTIFY: Final = 4

View File

@@ -0,0 +1,6 @@
from typing import Final
__version__: Final[str]
def dictformat(_format, L={}, G={}): ...
def magicformat(format): ...

View File

@@ -0,0 +1,59 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
def asNative(s): ...
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
class FontDescriptor:
name: Incomplete
fullName: Incomplete
familyName: Incomplete
styleName: Incomplete
isBold: bool
isItalic: bool
isFixedPitch: bool
isSymbolic: bool
typeCode: Incomplete
fileName: Incomplete
metricsFileName: Incomplete
timeModified: int
def __init__(self) -> None: ...
def getTag(self): ...
class FontFinder:
useCache: Incomplete
validate: Incomplete
verbose: Incomplete
def __init__(
self,
dirs=[],
useCache: bool = True,
validate: bool = False,
recur: bool = False,
fsEncoding: Incomplete | None = None,
verbose: int = 0,
) -> None: ...
def addDirectory(self, dirName, recur: Incomplete | None = None) -> None: ...
def addDirectories(self, dirNames, recur: Incomplete | None = None) -> None: ...
def getFamilyNames(self): ...
def getFontsInFamily(self, familyName): ...
def getFamilyXmlReport(self): ...
def getFontsWithAttributes(self, **kwds): ...
def getFont(self, familyName, bold: bool = False, italic: bool = False): ...
def save(self, fileName) -> None: ...
def load(self, fileName) -> None: ...
def search(self) -> None: ...
def test() -> None: ...

View File

@@ -0,0 +1,10 @@
from typing import Final, Literal
from typing_extensions import TypeAlias
_BoolInt: TypeAlias = Literal[0, 1]
__version__: Final[str]
def ps2tt(psfn: str) -> tuple[str, _BoolInt, _BoolInt]: ...
def tt2ps(fn: str, b: _BoolInt, i: _BoolInt) -> str: ...
def addMapping(face: str, bold: _BoolInt, italic: _BoolInt, psname: str) -> None: ...

View File

@@ -0,0 +1,24 @@
from _typeshed import Incomplete
class Formatter:
pattern: Incomplete
def __init__(self, pattern) -> None: ...
def format(self, obj): ...
def __call__(self, x): ...
class DecimalFormatter(Formatter):
calcPlaces: Incomplete
places: Incomplete
dot: Incomplete
comma: Incomplete
prefix: Incomplete
suffix: Incomplete
def __init__(
self,
places: int = 2,
decimalSep: str = ".",
thousandSep: Incomplete | None = None,
prefix: Incomplete | None = None,
suffix: Incomplete | None = None,
) -> None: ...
def format(self, num): ...

View File

@@ -0,0 +1,5 @@
from typing import Final
__version__: Final[str]
def normalizeTRBL(p): ...

View File

@@ -0,0 +1,24 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
class Logger:
def __init__(self) -> None: ...
def add(self, fp) -> None: ...
def remove(self, fp) -> None: ...
def write(self, text) -> None: ...
def __call__(self, text) -> None: ...
logger: Incomplete
class WarnOnce:
uttered: Incomplete
pfx: Incomplete
enabled: int
def __init__(self, kind: str = "Warn") -> None: ...
def once(self, warning) -> None: ...
def __call__(self, warning) -> None: ...
warnOnce: Incomplete
infoOnce: Incomplete

View File

@@ -0,0 +1,82 @@
from _typeshed import Incomplete
from typing import Final
__version__: Final[str]
def getStdMonthNames(): ...
def getStdShortMonthNames(): ...
def getStdDayNames(): ...
def getStdShortDayNames(): ...
def isLeapYear(year): ...
class NormalDateException(Exception): ...
class NormalDate:
def __init__(self, normalDate: Incomplete | None = None) -> None: ...
def add(self, days) -> None: ...
def __add__(self, days): ...
def __radd__(self, days): ...
def clone(self): ...
def __lt__(self, other): ...
def __le__(self, other): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __ge__(self, other): ...
def __gt__(self, other): ...
def day(self): ...
def dayOfWeek(self): ...
@property
def __day_of_week_name__(self): ...
def dayOfWeekAbbrev(self): ...
def dayOfWeekName(self): ...
def dayOfYear(self): ...
def daysBetweenDates(self, normalDate): ...
def equals(self, target): ...
def endOfMonth(self): ...
def firstDayOfMonth(self): ...
def formatUS(self): ...
def formatUSCentury(self): ...
def formatMS(self, fmt): ...
def __hash__(self): ...
def __int__(self) -> int: ...
def isLeapYear(self): ...
def lastDayOfMonth(self): ...
def localeFormat(self): ...
def month(self): ...
@property
def __month_name__(self): ...
def monthAbbrev(self): ...
def monthName(self): ...
def normalize(self, scalar) -> None: ...
def range(self, days): ...
def scalar(self): ...
def setDay(self, day) -> None: ...
def setMonth(self, month) -> None: ...
normalDate: Incomplete
def setNormalDate(self, normalDate) -> None: ...
def setYear(self, year) -> None: ...
def __sub__(self, v): ...
def __rsub__(self, v): ...
def toTuple(self): ...
def year(self): ...
def bigBang(): ...
def bigCrunch(): ...
def dayOfWeek(y, m, d): ...
def firstDayOfYear(year): ...
def FND(d): ...
Epoch: Incomplete
ND = NormalDate
BDEpoch: Incomplete
BDEpochScalar: int
class BusinessDate(NormalDate):
def add(self, days) -> None: ...
def __add__(self, days): ...
def __sub__(self, v): ...
def asNormalDate(self): ...
def daysBetweenDates(self, normalDate): ...
def normalize(self, i) -> None: ...
def scalar(self): ...
def setNormalDate(self, normalDate) -> None: ...

View File

@@ -0,0 +1,51 @@
from typing import Final
__version__: Final[str]
A0: Final[tuple[float, float]]
A1: Final[tuple[float, float]]
A2: Final[tuple[float, float]]
A3: Final[tuple[float, float]]
A4: Final[tuple[float, float]]
A5: Final[tuple[float, float]]
A6: Final[tuple[float, float]]
A7: Final[tuple[float, float]]
A8: Final[tuple[float, float]]
A9: Final[tuple[float, float]]
A10: Final[tuple[float, float]]
B0: Final[tuple[float, float]]
B1: Final[tuple[float, float]]
B2: Final[tuple[float, float]]
B3: Final[tuple[float, float]]
B4: Final[tuple[float, float]]
B5: Final[tuple[float, float]]
B6: Final[tuple[float, float]]
B7: Final[tuple[float, float]]
B8: Final[tuple[float, float]]
B9: Final[tuple[float, float]]
B10: Final[tuple[float, float]]
C0: Final[tuple[float, float]]
C1: Final[tuple[float, float]]
C2: Final[tuple[float, float]]
C3: Final[tuple[float, float]]
C4: Final[tuple[float, float]]
C5: Final[tuple[float, float]]
C6: Final[tuple[float, float]]
C7: Final[tuple[float, float]]
C8: Final[tuple[float, float]]
C9: Final[tuple[float, float]]
C10: Final[tuple[float, float]]
LETTER: Final[tuple[float, float]]
LEGAL: Final[tuple[float, float]]
ELEVENSEVENTEEN: Final[tuple[float, float]]
JUNIOR_LEGAL: Final[tuple[float, float]]
HALF_LETTER: Final[tuple[float, float]]
GOV_LETTER: Final[tuple[float, float]]
GOV_LEGAL: Final[tuple[float, float]]
TABLOID: Final[tuple[float, float]]
LEDGER: Final[tuple[float, float]]
letter: Final[tuple[float, float]]
legal: Final[tuple[float, float]]
elevenSeventeen: Final[tuple[float, float]]
def landscape(pagesize: tuple[float, float]) -> tuple[float, float]: ...
def portrait(pagesize: tuple[float, float]) -> tuple[float, float]: ...

View File

@@ -0,0 +1,133 @@
import os
from _typeshed import Incomplete
from typing import Final
from reportlab.pdfbase.pdfdoc import PDFObject
from reportlab.platypus.flowables import Flowable
__version__: Final[str]
def xorKey(num, key): ...
CLOBBERID: int
CLOBBERPERMISSIONS: int
DEBUG: Incomplete
reserved1: int
reserved2: Incomplete
printable: Incomplete
modifiable: Incomplete
copypastable: Incomplete
annotatable: Incomplete
higherbits: int
os_urandom = os.urandom
class StandardEncryption:
prepared: int
userPassword: Incomplete
ownerPassword: Incomplete
revision: int
canPrint: Incomplete
canModify: Incomplete
canCopy: Incomplete
canAnnotate: Incomplete
O: Incomplete
def __init__(
self,
userPassword,
ownerPassword: Incomplete | None = None,
canPrint: int = 1,
canModify: int = 1,
canCopy: int = 1,
canAnnotate: int = 1,
strength: Incomplete | None = None,
) -> None: ...
def setAllPermissions(self, value) -> None: ...
def permissionBits(self): ...
def encode(self, t): ...
P: Incomplete
key: Incomplete
U: Incomplete
UE: Incomplete
OE: Incomplete
Perms: Incomplete
objnum: Incomplete
def prepare(self, document, overrideID: Incomplete | None = None) -> None: ...
version: Incomplete
def register(self, objnum, version) -> None: ...
def info(self): ...
class StandardEncryptionDictionary(PDFObject):
__RefOnly__: int
revision: Incomplete
def __init__(self, O, OE, U, UE, P, Perms, revision) -> None: ...
def format(self, document): ...
padding: str
def hexText(text): ...
def unHexText(hexText): ...
PadString: Incomplete
def checkRevision(revision): ...
def encryptionkey(password, OwnerKey, Permissions, FileId1, revision: Incomplete | None = None): ...
def computeO(userPassword, ownerPassword, revision): ...
def computeU(
encryptionkey,
encodestring=b"(\xbfN^Nu\x8aAd\x00NV\xff\xfa\x01\x08..\x00\xb6\xd0h>\x80/\x0c\xa9\xfedSiz",
revision: Incomplete | None = None,
documentId: Incomplete | None = None,
): ...
def checkU(encryptionkey, U) -> None: ...
def encodePDF(key, objectNumber, generationNumber, string, revision: Incomplete | None = None): ...
def equalityCheck(observed, expected, label) -> None: ...
def test() -> None: ...
def encryptCanvas(
canvas,
userPassword,
ownerPassword: Incomplete | None = None,
canPrint: int = 1,
canModify: int = 1,
canCopy: int = 1,
canAnnotate: int = 1,
strength: int = 40,
) -> None: ...
class EncryptionFlowable(StandardEncryption, Flowable):
def wrap(self, availWidth, availHeight): ...
def draw(self) -> None: ...
def encryptDocTemplate(
dt,
userPassword,
ownerPassword: Incomplete | None = None,
canPrint: int = 1,
canModify: int = 1,
canCopy: int = 1,
canAnnotate: int = 1,
strength: int = 40,
) -> None: ...
def encryptPdfInMemory(
inputPDF,
userPassword,
ownerPassword: Incomplete | None = None,
canPrint: int = 1,
canModify: int = 1,
canCopy: int = 1,
canAnnotate: int = 1,
strength: int = 40,
): ...
def encryptPdfOnDisk(
inputFileName,
outputFileName,
userPassword,
ownerPassword: Incomplete | None = None,
canPrint: int = 1,
canModify: int = 1,
canCopy: int = 1,
canAnnotate: int = 1,
strength: int = 40,
): ...
def scriptInterp() -> None: ...
def main() -> None: ...

View File

@@ -0,0 +1 @@
def pygments2xpre(s, language: str = "python"): ...

View File

@@ -0,0 +1,19 @@
from collections.abc import Sequence
from typing import Final
__version__: Final[str]
STARTUP: Final[Sequence[str]]
COMPUTERS: Final[Sequence[str]]
BLAH: Final[Sequence[str]]
BUZZWORD: Final[Sequence[str]]
STARTREK: Final[Sequence[str]]
PRINTING: Final[Sequence[str]]
PYTHON: Final[Sequence[str]]
leadins: Final[Sequence[str]]
subjects: Final[Sequence[str]]
verbs: Final[Sequence[str]]
objects: Final[Sequence[str]]
def format_wisdom(text: str, line_length: int = 72) -> str: ...
def chomsky(times: int = 1) -> str: ...
def randomText(theme: str | Sequence[str] = ..., sentences: int = 5) -> str: ...

View File

@@ -0,0 +1,11 @@
def fp_str(*a): ...
def unicode2T1(utext, fonts): ...
def instanceStringWidthT1(self, text, size, encoding: str = "utf8"): ...
def instanceStringWidthTTF(self, text, size, encoding: str = "utf-8"): ...
def hex32(i): ...
def add32(x, y): ...
def calcChecksum(data): ...
def escapePDF(s): ...
def asciiBase85Encode(input): ...
def asciiBase85Decode(input): ...
def sameFrag(f, g): ...

View File

@@ -0,0 +1,253 @@
import ast
import math
import time
from _typeshed import Incomplete
from collections.abc import Generator
from typing import NoReturn
eval_debug: Incomplete
strTypes: Incomplete
isPy39: Incomplete
haveNameConstant: Incomplete
class BadCode(ValueError): ...
augOps: Incomplete
__allowed_magic_methods__: Incomplete
__rl_unsafe__: Incomplete
__rl_unsafe_re__: Incomplete
def copy_locations(new_node, old_node) -> None: ...
class UntrustedAstTransformer(ast.NodeTransformer):
names_seen: Incomplete
nameIsAllowed: Incomplete
def __init__(self, names_seen: Incomplete | None = None, nameIsAllowed: Incomplete | None = None) -> None: ...
@property
def tmpName(self): ...
def error(self, node, msg) -> NoReturn: ...
def guard_iter(self, node): ...
def is_starred(self, ob): ...
def gen_unpack_spec(self, tpl): ...
def protect_unpack_sequence(self, target, value): ...
def gen_unpack_wrapper(self, node, target, ctx: str = "store"): ...
def gen_none_node(self): ...
def gen_lambda(self, args, body): ...
def gen_del_stmt(self, name_to_del): ...
def transform_slice(self, slice_): ...
def isAllowedName(self, node, name) -> None: ...
def check_function_argument_names(self, node) -> None: ...
def check_import_names(self, node): ...
def gen_attr_check(self, node, attr_name): ...
def visit_Constant(self, node): ...
def visit_Name(self, node): ...
def visit_Call(self, node): ...
def visit_Attribute(self, node): ...
def visit_Subscript(self, node): ...
def visit_Assign(self, node): ...
def visit_AugAssign(self, node): ...
def visit_While(node): ...
def visit_ExceptHandler(self, node): ...
def visit_With(self, node): ...
def visit_FunctionDef(self, node): ...
def visit_Lambda(self, node): ...
def visit_ClassDef(self, node): ...
def visit_Import(self, node): ...
def visit_BinOp(self, node): ...
visit_ImportFrom = visit_Import # pyright: ignore[reportAssignmentType]
visit_For = guard_iter
visit_comprehension = guard_iter
def generic_visit(self, node: ast.AST) -> None: ... # type: ignore[override]
def not_allowed(self, node: ast.AST) -> NoReturn: ...
def visit_children(self, node): ...
def visit(self, node): ...
visit_Ellipsis = not_allowed
visit_MatMult = not_allowed
visit_Exec = not_allowed
visit_Nonlocal = not_allowed
visit_AsyncFunctionDef = not_allowed
visit_Await = not_allowed
visit_AsyncFor = not_allowed
visit_AsyncWith = not_allowed
visit_Print = not_allowed
visit_Num = visit_children
visit_Str = visit_children
visit_Bytes = visit_children
visit_List = visit_children
visit_Tuple = visit_children
visit_Set = visit_children
visit_Dict = visit_children
visit_FormattedValue = visit_children
visit_JoinedStr = visit_children
visit_NameConstant = visit_children
visit_Load = visit_children
visit_Store = visit_children
visit_Del = visit_children
visit_Starred = visit_children
visit_Expression = visit_children
visit_Expr = visit_children
visit_UnaryOp = visit_children
visit_UAdd = visit_children
visit_USub = visit_children
visit_Not = visit_children
visit_Invert = visit_children
visit_Add = visit_children
visit_Sub = visit_children
visit_Mult = visit_children
visit_Div = visit_children
visit_FloorDiv = visit_children
visit_Pow = visit_children
visit_Mod = visit_children
visit_LShift = visit_children
visit_RShift = visit_children
visit_BitOr = visit_children
visit_BitXor = visit_children
visit_BitAnd = visit_children
visit_BoolOp = visit_children
visit_And = visit_children
visit_Or = visit_children
visit_Compare = visit_children
visit_Eq = visit_children
visit_NotEq = visit_children
visit_Lt = visit_children
visit_LtE = visit_children
visit_Gt = visit_children
visit_GtE = visit_children
visit_Is = visit_children
visit_IsNot = visit_children
visit_In = visit_children
visit_NotIn = visit_children
visit_keyword = visit_children
visit_IfExp = visit_children
visit_Index = visit_children
visit_Slice = visit_children
visit_ExtSlice = visit_children
visit_ListComp = visit_children
visit_SetComp = visit_children
visit_GeneratorExp = visit_children
visit_DictComp = visit_children
visit_Raise = visit_children
visit_Assert = visit_children
visit_Delete = visit_children
visit_Pass = visit_children
visit_alias = visit_children
visit_If = visit_children
visit_Break = visit_children
visit_Continue = visit_children
visit_Try = visit_children
visit_TryFinally = visit_children
visit_TryExcept = visit_children
visit_withitem = visit_children
visit_arguments = visit_children
visit_arg = visit_children
visit_Return = visit_children
visit_Yield = visit_children
visit_YieldFrom = visit_children
visit_Global = visit_children
visit_Module = visit_children
visit_Param = visit_children
def astFormat(node): ...
class __rl_SafeIter__:
__rl_iter__: Incomplete
__rl_owner__: Incomplete
def __init__(self, it, owner) -> None: ...
def __iter__(self): ...
def __next__(self): ...
next = __next__
__rl_safe_builtins__: Incomplete
def safer_globals(g: Incomplete | None = None): ...
math_log10 = math.log10
__rl_undef__: Incomplete
class __RL_SAFE_ENV__:
__time_time__ = time.time
__weakref_ref__: Incomplete
__slicetype__: Incomplete
timeout: Incomplete
allowed_magic_methods: Incomplete
__rl_gen_range__: Incomplete
__rl_real_iter__: Incomplete
real_bi: Incomplete
bi_replace: Incomplete
__rl_builtins__: Incomplete
def __init__(self, timeout: Incomplete | None = None, allowed_magic_methods: Incomplete | None = None) -> None: ...
def __rl_type__(self, *args): ...
def __rl_check__(self) -> None: ...
def __rl_sd__(self, obj): ...
def __rl_getiter__(self, it): ...
def __rl_max__(self, arg, *args, **kwds): ...
def __rl_min__(self, arg, *args, **kwds): ...
def __rl_sum__(self, sequence, start: int = 0): ...
def __rl_enumerate__(self, seq): ...
def __rl_zip__(self, *args): ...
def __rl_hasattr__(self, obj, name): ...
def __rl_filter__(self, f, seq): ...
def __rl_map__(self, f, seq): ...
def __rl_any__(self, seq): ...
def __rl_all__(self, seq): ...
def __rl_sorted__(self, seq, **kwds): ...
def __rl_reversed__(self, seq): ...
def __rl_range__(self, start, *args): ...
def __rl_set__(self, it): ...
def __rl_frozenset__(self, it): ...
def __rl_iter_unpack_sequence__(self, it, spec, _getiter_) -> Generator[Incomplete, None, None]: ...
def __rl_unpack_sequence__(self, it, spec, _getiter_): ...
def __rl_is_allowed_name__(self, name) -> None: ...
def __rl_getattr__(self, obj, a, *args): ...
def __rl_getitem__(self, obj, a): ...
__rl_tmax__: int
__rl_max_len__: int
__rl_max_pow_digits__: int
def __rl_add__(self, a, b): ...
def __rl_mult__(self, a, b): ...
def __rl_pow__(self, a, b): ...
def __rl_augAssign__(self, op, v, i): ...
def __rl_apply__(self, func, args, kwds): ...
def __rl_args_iter__(self, *args): ...
def __rl_list__(self, it): ...
def __rl_compile__(
self,
src,
fname: str = "<string>",
mode: str = "eval",
flags: int = 0,
inherit: bool = True,
visit: Incomplete | None = None,
): ...
__rl_limit__: Incomplete
def __rl_safe_eval__(
self,
expr,
g,
l,
mode,
timeout: Incomplete | None = None,
allowed_magic_methods: Incomplete | None = None,
__frame_depth__: int = 3,
): ...
class __rl_safe_eval__:
mode: str
env: Incomplete
def __init__(self) -> None: ...
def __call__(
self,
expr,
g: Incomplete | None = None,
l: Incomplete | None = None,
timeout: Incomplete | None = None,
allowed_magic_methods: Incomplete | None = None,
): ...
class __rl_safe_exec__(__rl_safe_eval__):
mode: str
def rl_extended_literal_eval(expr, safe_callables: Incomplete | None = None, safe_names: Incomplete | None = None): ...
rl_safe_exec: __rl_safe_exec__
rl_safe_eval: __rl_safe_eval__

View File

@@ -0,0 +1,2 @@
def get_rl_tempdir(*subdirs: str) -> str: ...
def get_rl_tempfile(fn: str | None = None) -> str: ...

View File

@@ -0,0 +1,32 @@
from _typeshed import Incomplete
RequirePyRXP: int
simpleparse: int
class _smartDecode:
@staticmethod
def __call__(s): ...
smartDecode: _smartDecode
NONAME: str
NAMEKEY: int
CONTENTSKEY: int
CDATAMARKER: str
LENCDATAMARKER: Incomplete
CDATAENDMARKER: str
replacelist: Incomplete
def unEscapeContentList(contentList): ...
def parsexmlSimple(xmltext, oneOutermostTag: int = 0, eoCB: Incomplete | None = None, entityReplacer=...): ...
parsexml = parsexmlSimple
def parseFile(filename): ...
verbose: int
def skip_prologue(text, cursor): ...
def parsexml0(xmltext, startingat: int = 0, toplevel: int = 1, entityReplacer=...): ...
def pprettyprint(parsedxml): ...
def testparse(s, dump: int = 0) -> None: ...
def test(dump: int = 0) -> None: ...

View File

@@ -0,0 +1,31 @@
from _typeshed import Incomplete
__all__ = ["Sequencer", "getSequencer", "setSequencer"]
class _Counter:
def __init__(self) -> None: ...
def setFormatter(self, formatFunc) -> None: ...
def reset(self, value: Incomplete | None = None) -> None: ...
def next(self): ...
__next__ = next
def nextf(self): ...
def thisf(self): ...
def chain(self, otherCounter) -> None: ...
class Sequencer:
def __init__(self) -> None: ...
def __next__(self): ...
def next(self, counter: Incomplete | None = None): ...
def thisf(self, counter: Incomplete | None = None): ...
def nextf(self, counter: Incomplete | None = None): ...
def setDefaultCounter(self, default: Incomplete | None = None) -> None: ...
def registerFormat(self, format, func) -> None: ...
def setFormat(self, counter, format) -> None: ...
def reset(self, counter: Incomplete | None = None, base: int = 0) -> None: ...
def chain(self, parent, child) -> None: ...
def __getitem__(self, key): ...
def format(self, template): ...
def dump(self) -> None: ...
def getSequencer(): ...
def setSequencer(seq): ...

View File

@@ -0,0 +1,181 @@
from _typeshed import Incomplete
from typing import Any, ClassVar, Literal, TypeVar, overload
from typing_extensions import Self, TypeAlias
from reportlab.lib.colors import Color
_AlignmentEnum: TypeAlias = Literal[0, 1, 2, 4]
# FIXME: There are some places in the code that expect upper-case versions
# so I'm unsure whether those would work in stylesheets as well
_AlignmentStr: TypeAlias = Literal["left", "center", "centre", "right", "justify"]
_Alignment: TypeAlias = _AlignmentEnum | _AlignmentStr
_T = TypeVar("_T")
class PropertySet:
defaults: ClassVar[dict[str, Any]]
name: str
parent: PropertySet | None
def __init__(self, name: str, parent: PropertySet | None = None, **kw: Any) -> None: ...
def refresh(self) -> None: ...
def listAttrs(self, indent: str = "") -> None: ...
def clone(self, name: str, parent: PropertySet | None = None, **kwds: Any) -> Self: ...
# PropertySet can have arbitrary attributes
def __getattr__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
class ParagraphStyle(PropertySet):
# NOTE: We list the attributes this has for sure due to defaults
fontName: str
fontSize: float
leading: float
leftIndent: float
rightIndent: float
firstLineIndent: float
alignment: _Alignment
spaceBefore: float
spaceAfter: float
bulletFontName: str
bulletFontSize: float
bulletIndent: float
textColor: Color
backColor: Color | None
wordWrap: Incomplete | None
borderWidth: float
borderPadding: float
borderColor: Color | None
borderRadius: float | None
allowWidows: Incomplete
allowOrphans: Incomplete
textTransform: Incomplete | None
endDots: Incomplete | None
splitLongWords: Incomplete
underlineWidth: float
bulletAnchor: Literal["start", "middle", "end"] | float
justifyLastLine: Incomplete
justifyBreaks: Incomplete
spaceShrinkage: float
strikeWidth: float
underlineOffset: float
underlineGap: float
strikeOffset: float
strikeGap: float
linkUnderline: Incomplete
underlineColor: Color | None
strikeColor: Color | None
hyphenationLang: str
embeddedHyphenation: Incomplete
uriWasteReduce: float
# NOTE: We redefine __init__ for the same reason
def __init__(
self,
name: str,
parent: PropertySet | None = None,
*,
fontName: str = ...,
fontSize: float = ...,
leading: float = ...,
leftIndent: float = ...,
rightIndent: float = ...,
firstLineIndent: float = ...,
alignment: _Alignment = ...,
spaceBefore: float = ...,
spaceAfter: float = ...,
bulletFontName: str = ...,
bulletFontSize: float = ...,
bulletIndent: float = ...,
textColor: Color = ...,
backColor: Color | None = ...,
wordWrap: Incomplete | None = ...,
borderWidth: float = ...,
borderPadding: float = ...,
borderColor: Color | None = ...,
borderRadius: float | None = ...,
allowWidows=...,
allowOrphans=...,
textTransform: Incomplete | None = ...,
endDots: Incomplete | None = ...,
splitLongWords=...,
underlineWidth: float = ...,
bulletAnchor: Literal["start", "middle", "end"] | float = ...,
justifyLastLine=...,
justifyBreaks=...,
spaceShrinkage: float = ...,
strikeWidth: float = ...,
underlineOffset: float = ...,
underlineGap: float = ...,
strikeOffset: float = ...,
strikeGap: float = ...,
linkUnderline=...,
underlineColor: Color | None = ...,
strikeColor: Color | None = ...,
hyphenationLang: str = ...,
embeddedHyphenation=...,
uriWasteReduce: float = ...,
**kw: Any,
) -> None: ...
def str2alignment(
v: _AlignmentStr,
__map__: dict[_AlignmentStr, _AlignmentEnum] = {"centre": 1, "center": 1, "left": 0, "right": 2, "justify": 4},
) -> _AlignmentEnum: ...
class LineStyle(PropertySet):
# NOTE: We list the attributes this has for sure due to defaults
width: float
color: Color
def prepareCanvas(self, canvas) -> None: ...
# NOTE: We redefine __init__ for the same reason
def __init__(
self, name: str, parent: PropertySet | None = None, *, width: float = ..., color: Color = ..., **kw: Any
) -> None: ...
class ListStyle(PropertySet):
# NOTE: We list the attributes this has for sure due to defaults
leftIndent: float
rightIndent: float
bulletAlign: _Alignment
bulletType: str
bulletColor: Color
bulletFontName: str
bulletFontSize: float
bulletOffsetY: float
bulletDedent: Incomplete
bulletDir: Incomplete
bulletFormat: Incomplete | None
start: Incomplete | None
# NOTE: We redefine __init__ for the same reason
def __init__(
self,
name: str,
parent: PropertySet | None = None,
*,
leftIndent: float = ...,
rightIndent: float = ...,
bulletAlign: _Alignment = ...,
bulletType: str = ...,
bulletColor: Color = ...,
bulletFontName: str = ...,
bulletFontSize: float = ...,
bulletOffsetY: float = ...,
bulletDedent=...,
bulletDir=...,
bulletFormat: Incomplete | None = ...,
start: Incomplete | None = ...,
**kw: Any,
) -> None: ...
class StyleSheet1:
byName: dict[str, PropertySet]
byAlias: dict[str, PropertySet]
def __init__(self) -> None: ...
def __getitem__(self, key: str) -> PropertySet: ...
@overload
def get(self, key: str) -> PropertySet: ...
@overload
def get(self, key: str, default: _T) -> PropertySet | _T: ...
def __contains__(self, key: str) -> bool: ...
def has_key(self, key: str) -> bool: ...
def add(self, style: PropertySet, alias: str | None = None) -> None: ...
def list(self) -> None: ...
def getSampleStyleSheet() -> StyleSheet1: ...

View File

@@ -0,0 +1,67 @@
import unittest
from _typeshed import Incomplete
from configparser import ConfigParser
from typing import Final
__version__: Final[str]
def haveRenderPM(): ...
def isWritable(D): ...
RL_HOME: Incomplete
testsFolder: Incomplete
def setOutDir(name): ...
def mockUrlRead(name): ...
def outputfile(fn): ...
def printLocation(depth: int = 1) -> None: ...
def makeSuiteForClasses(*classes, testMethodPrefix: Incomplete | None = None): ...
def getCVSEntries(folder, files: int = 1, folders: int = 0): ...
class ExtConfigParser(ConfigParser):
pat: Incomplete
def getstringlist(self, section, option): ...
class GlobDirectoryWalker:
index: int
pattern: Incomplete
stack: Incomplete
files: Incomplete
directory: Incomplete
def __init__(self, directory, pattern: str = "*") -> None: ...
def __getitem__(self, index): ...
def filterFiles(self, folder, files): ...
class RestrictedGlobDirectoryWalker(GlobDirectoryWalker):
ignorePatterns: Incomplete
def __init__(self, directory, pattern: str = "*", ignore: Incomplete | None = None) -> None: ...
def filterFiles(self, folder, files): ...
class CVSGlobDirectoryWalker(GlobDirectoryWalker):
def filterFiles(self, folder, files): ...
class SecureTestCase(unittest.TestCase):
def setUp(self) -> None: ...
def tearDown(self) -> None: ...
class NearTestCase(unittest.TestCase):
@staticmethod
def assertNear(a, b, accuracy: float = 1e-05) -> None: ...
class ScriptThatMakesFileTest(unittest.TestCase):
scriptDir: Incomplete
scriptName: Incomplete
outFileName: Incomplete
verbose: Incomplete
def __init__(self, scriptDir, scriptName, outFileName, verbose: int = 0) -> None: ...
cwd: Incomplete
def setUp(self) -> None: ...
def tearDown(self) -> None: ...
def runTest(self) -> None: ...
def equalStrings(a, b, enc: str = "utf8"): ...
def eqCheck(r, x) -> None: ...
def rlextraNeeded(): ...
def rlSkipIf(cond, reason, __module__: Incomplete | None = None): ...
def rlSkipUnless(cond, reason, __module__: Incomplete | None = None): ...
def rlSkip(reason, __module__: Incomplete | None = None): ...

Some files were not shown because too many files have changed in this diff Show More