basedpyright 1.12.4 → 1.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/_ast.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/_json.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/argparse.pyi +211 -53
- package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/base64.pyi +6 -0
- package/dist/typeshed-fallback/stdlib/builtins.pyi +22 -5
- package/dist/typeshed-fallback/stdlib/configparser.pyi +143 -52
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +3 -5
- package/dist/typeshed-fallback/stdlib/datetime.pyi +32 -0
- package/dist/typeshed-fallback/stdlib/enum.pyi +10 -2
- package/dist/typeshed-fallback/stdlib/glob.pyi +9 -1
- package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/io.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/ipaddress.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/itertools.pyi +58 -0
- package/dist/typeshed-fallback/stdlib/json/encoder.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/locale.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/logging/handlers.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/math.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/mimetypes.pyi +9 -0
- package/dist/typeshed-fallback/stdlib/mmap.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +4 -0
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +44 -11
- package/dist/typeshed-fallback/stdlib/pdb.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/platform.pyi +25 -0
- package/dist/typeshed-fallback/stdlib/pydoc.pyi +79 -30
- package/dist/typeshed-fallback/stdlib/shutil.pyi +9 -6
- package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +37 -16
- package/dist/typeshed-fallback/stdlib/time.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/traceback.pyi +54 -18
- package/dist/typeshed-fallback/stdlib/types.pyi +4 -0
- package/dist/typeshed-fallback/stdlib/typing.pyi +14 -2
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +5 -3
- package/dist/typeshed-fallback/stubs/Flask-Cors/flask_cors/extension.pyi +1 -1
- package/dist/typeshed-fallback/stubs/PyMySQL/pymysql/__init__.pyi +5 -0
- package/dist/typeshed-fallback/stubs/PyMySQL/pymysql/connections.pyi +2 -0
- package/dist/typeshed-fallback/stubs/PyMySQL/pymysql/converters.pyi +4 -3
- package/dist/typeshed-fallback/stubs/docker/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/client.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +17 -2
- package/dist/typeshed-fallback/stubs/docker/docker/client.pyi +16 -2
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +30 -4
- package/dist/typeshed-fallback/stubs/docker/docker/models/networks.pyi +1 -1
- package/dist/typeshed-fallback/stubs/greenlet/greenlet/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/hvac/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/aws.pyi +7 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/auth_methods/jwt.pyi +2 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/identity.pyi +0 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/ldap.pyi +41 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/secrets_engines/transit.pyi +4 -2
- package/dist/typeshed-fallback/stubs/hvac/hvac/api/vault_api_base.pyi +4 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/constants/identity.pyi +2 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/exceptions.pyi +2 -0
- package/dist/typeshed-fallback/stubs/nanoid/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/nanoid/nanoid/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/nanoid/nanoid/algorithm.pyi +1 -0
- package/dist/typeshed-fallback/stubs/nanoid/nanoid/generate.pyi +3 -0
- package/dist/typeshed-fallback/stubs/nanoid/nanoid/method.pyi +6 -0
- package/dist/typeshed-fallback/stubs/nanoid/nanoid/non_secure_generate.pyi +3 -0
- package/dist/typeshed-fallback/stubs/nanoid/nanoid/resources.pyi +2 -0
- package/dist/typeshed-fallback/stubs/netaddr/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/netaddr/netaddr/ip/__init__.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +12 -9
- package/dist/typeshed-fallback/stubs/openpyxl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pep8-naming/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pep8-naming/pep8ext_naming.pyi +0 -1
- package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +64 -64
- package/dist/typeshed-fallback/stubs/pyserial/serial/serialutil.pyi +1 -1
- package/dist/typeshed-fallback/stubs/python-crontab/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/python-crontab/crontab.pyi +1 -0
- package/dist/typeshed-fallback/stubs/reportlab/METADATA.toml +6 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/__init__.pyi +11 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/__init__.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/code128.pyi +33 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/code39.pyi +32 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/code93.pyi +28 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/common.pyi +124 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/dmtx.pyi +68 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/eanbc.pyi +41 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/ecc200datamatrix.pyi +22 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/fourstate.pyi +0 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/lto.pyi +41 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/qr.pyi +52 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/qrencoder.pyi +202 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/usps.pyi +36 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/usps4s.pyi +85 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/barcode/widgets.pyi +65 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/areas.pyi +19 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/axes.pyi +205 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/barcharts.pyi +105 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/dotbox.pyi +24 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/doughnut.pyi +34 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/legends.pyi +101 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/linecharts.pyi +67 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/lineplots.pyi +119 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/markers.pyi +10 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/piecharts.pyi +182 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/slidebox.pyi +38 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/spider.pyi +60 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/textlabels.pyi +60 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/utils.pyi +49 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/charts/utils3d.pyi +26 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/renderPDF.pyi +39 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/renderPM.pyi +127 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/renderPS.pyi +73 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/renderSVG.pyi +131 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/renderbase.pyi +40 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/bubble.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/clustered_bar.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/clustered_column.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/excelcolors.pyi +33 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/exploded_pie.pyi +8 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/filled_radar.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/line_chart.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/linechart_with_markers.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/radar.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/runall.pyi +3 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/scatter.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/scatter_lines.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/scatter_lines_markers.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/simple_pie.pyi +8 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/stacked_bar.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/samples/stacked_column.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/shapes.pyi +371 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/svgpath.pyi +8 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/transform.pyi +12 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/utils.pyi +22 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgetbase.pyi +112 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/adjustableArrow.pyi +11 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/eventcal.pyi +29 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/flags.pyi +32 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/grids.pyi +76 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/markers.pyi +21 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/signsandsymbols.pyi +164 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/graphics/widgets/table.pyi +32 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/PyFontify.pyi +21 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/abag.pyi +11 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/arciv.pyi +7 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/attrmap.pyi +40 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/boxstuff.pyi +6 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/codecharts.pyi +80 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/colors.pyi +318 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/corp.pyi +79 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/enums.pyi +7 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/extformat.pyi +6 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/fontfinder.pyi +59 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/fonts.pyi +10 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/formatters.pyi +24 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/geomutils.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/logger.pyi +24 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/normalDate.pyi +82 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/pagesizes.pyi +51 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/pdfencrypt.pyi +133 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/pygments2xpre.pyi +1 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/randomtext.pyi +19 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rl_accel.pyi +11 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi +253 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rltempfile.pyi +2 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/rparsexml.pyi +32 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/sequencer.pyi +31 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/styles.pyi +181 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/testutils.pyi +67 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/textsplit.pyi +19 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/units.pyi +9 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/utils.pyi +190 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/validators.pyi +171 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/lib/yaml.pyi +26 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/acroform.pyi +214 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/cidfonts.pyi +51 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi +627 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfform.pyi +81 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfmetrics.pyi +93 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfpattern.pyi +21 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/pdfutils.pyi +16 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/rl_codecs.pyi +24 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfbase/ttfonts.pyi +150 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfgen/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfgen/canvas.pyi +306 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfgen/pathobject.pyi +18 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfgen/pdfgeom.pyi +5 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfgen/pdfimages.pyi +38 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/pdfgen/textobject.pyi +52 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/__init__.pyi +12 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/doctemplate.pyi +267 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/figures.pyi +118 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/flowables.pyi +451 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/frames.pyi +37 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/multicol.pyi +17 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/para.pyi +271 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/paragraph.pyi +38 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/paraparser.pyi +117 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/tableofcontents.pyi +108 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/tables.pyi +124 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/xpreformatted.pyi +30 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/rl_config.pyi +71 -0
- package/dist/typeshed-fallback/stubs/reportlab/reportlab/rl_settings.pyi +72 -0
- package/dist/typeshed-fallback/stubs/requests/requests/__version__.pyi +12 -10
- package/dist/typeshed-fallback/stubs/requests/requests/adapters.pyi +38 -7
- package/dist/typeshed-fallback/stubs/requests/requests/models.pyi +21 -21
- package/dist/typeshed-fallback/stubs/requests/requests/utils.pyi +8 -6
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +25 -19
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build.pyi +1 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/editable_wheel.pyi +3 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py311.pyi +3 -2
- package/dist/typeshed-fallback/stubs/shapely/METADATA.toml +4 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/__init__.pyi +34 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/_enum.pyi +5 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/_geometry.pyi +184 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/_ragged_array.pyi +12 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/_typing.pyi +58 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/_version.pyi +6 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/affinity.pyi +23 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/algorithms/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/algorithms/cga.pyi +6 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/algorithms/polylabel.pyi +19 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/constructive.pyi +430 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/coordinates.pyi +43 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/coords.pyi +18 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/creation.pyi +242 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/decorators.pyi +11 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/errors.pyi +17 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/__init__.pyi +25 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/base.pyi +285 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/collection.pyi +18 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/geo.pyi +9 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/linestring.pyi +45 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/multilinestring.pyi +15 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/multipoint.pyi +20 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/multipolygon.pyi +22 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/point.pyi +39 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geometry/polygon.pyi +45 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/geos.pyi +3 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/io.pyi +140 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/lib.pyi +167 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/linear.pyi +69 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/measurement.pyi +68 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/ops.pyi +106 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/plotting.pyi +76 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/predicates.pyi +214 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/prepared.pyi +20 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/set_operations.pyi +86 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/speedups.pyi +12 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/strtree.pyi +82 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/testing.pyi +14 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/validation.pyi +7 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/vectorized/__init__.pyi +37 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/wkb.pyi +16 -0
- package/dist/typeshed-fallback/stubs/shapely/shapely/wkt.pyi +8 -0
- package/package.json +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/dep_util.pyi +0 -1
- package/dist/typeshed-fallback/stubs/stripe/METADATA.toml +0 -7
- package/dist/typeshed-fallback/stubs/stripe/stripe/__init__.pyi +0 -25
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_requestor.pyi +0 -38
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/__init__.pyi +0 -82
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/__init__.pyi +0 -12
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/api_resource.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/createable_api_resource.pyi +0 -16
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/custom_method.pyi +0 -3
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/deletable_api_resource.pyi +0 -7
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/listable_api_resource.pyi +0 -19
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/nested_resource_class_methods.pyi +0 -7
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/searchable_api_resource.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/singleton_api_resource.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/updateable_api_resource.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/abstract/verify_mixin.pyi +0 -2
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/account.pyi +0 -75
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/account_link.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/alipay_account.pyi +0 -23
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/apple_pay_domain.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/application_fee.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/application_fee_refund.pyi +0 -14
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/balance.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/balance_transaction.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/bank_account.pyi +0 -26
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/billing_portal/__init__.pyi +0 -2
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/billing_portal/configuration.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/billing_portal/session.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/bitcoin_receiver.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/bitcoin_transaction.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/capability.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/card.pyi +0 -26
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/charge.pyi +0 -17
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/checkout/__init__.pyi +0 -1
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/checkout/session.pyi +0 -16
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/country_spec.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/coupon.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/credit_note.pyi +0 -21
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/credit_note_line_item.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/customer.pyi +0 -58
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/customer_balance_transaction.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/dispute.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/ephemeral_key.pyi +0 -16
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/error_object.pyi +0 -25
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/event.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/exchange_rate.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/file.pyi +0 -21
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/file_link.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/identity/__init__.pyi +0 -2
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/identity/verification_report.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/identity/verification_session.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/invoice.pyi +0 -28
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/invoice_item.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/invoice_line_item.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuer_fraud_record.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/__init__.pyi +0 -6
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/authorization.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/card.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/card_details.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/cardholder.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/dispute.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/issuing/transaction.pyi +0 -7
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/line_item.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/list_object.pyi +0 -57
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/login_link.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/mandate.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/order.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/payment_intent.pyi +0 -22
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/payment_link.pyi +0 -24
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/payment_method.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/payout.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/person.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/plan.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/price.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/product.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/promotion_code.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/quote.pyi +0 -24
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/radar/__init__.pyi +0 -3
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/radar/early_fraud_warning.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/radar/value_list.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/radar/value_list_item.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/recipient.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/recipient_transfer.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/refund.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/reporting/__init__.pyi +0 -2
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/reporting/report_run.pyi +0 -7
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/reporting/report_type.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/reversal.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/review.pyi +0 -5
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/search_result_object.pyi +0 -32
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/setup_attempt.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/setup_intent.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/shipping_rate.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/sigma/__init__.pyi +0 -1
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/sigma/scheduled_query_run.pyi +0 -6
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/sku.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/source.pyi +0 -13
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/source_transaction.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/subscription.pyi +0 -15
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/subscription_item.pyi +0 -27
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/subscription_schedule.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/tax_code.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/tax_id.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/tax_rate.pyi +0 -8
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/terminal/__init__.pyi +0 -3
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/terminal/connection_token.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/terminal/location.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/terminal/reader.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/test_helpers/__init__.pyi +0 -1
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/test_helpers/test_clock.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/three_d_secure.pyi +0 -6
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/token.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/topup.pyi +0 -10
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/transfer.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/usage_record.pyi +0 -16
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/usage_record_summary.pyi +0 -4
- package/dist/typeshed-fallback/stubs/stripe/stripe/api_resources/webhook_endpoint.pyi +0 -9
- package/dist/typeshed-fallback/stubs/stripe/stripe/error.pyi +0 -76
- package/dist/typeshed-fallback/stubs/stripe/stripe/http_client.pyi +0 -52
- package/dist/typeshed-fallback/stubs/stripe/stripe/multipart_data_generator.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/oauth.pyi +0 -11
- package/dist/typeshed-fallback/stubs/stripe/stripe/oauth_error.pyi +0 -22
- package/dist/typeshed-fallback/stubs/stripe/stripe/object_classes.pyi +0 -5
- package/dist/typeshed-fallback/stubs/stripe/stripe/request_metrics.pyi +0 -7
- package/dist/typeshed-fallback/stubs/stripe/stripe/stripe_object.pyi +0 -62
- package/dist/typeshed-fallback/stubs/stripe/stripe/stripe_response.pyi +0 -19
- package/dist/typeshed-fallback/stubs/stripe/stripe/util.pyi +0 -42
- package/dist/typeshed-fallback/stubs/stripe/stripe/version.pyi +0 -1
- package/dist/typeshed-fallback/stubs/stripe/stripe/webhook.pyi +0 -17
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
from _typeshed import Incomplete, Unused
|
|
2
|
+
from collections.abc import Callable, Mapping
|
|
3
|
+
from typing import Any, Final, Literal, Protocol, TypedDict, TypeVar, overload
|
|
4
|
+
from typing_extensions import TypeAlias, Unpack
|
|
5
|
+
|
|
6
|
+
from reportlab.lib.colors import Color
|
|
7
|
+
from reportlab.lib.styles import ParagraphStyle, PropertySet, StyleSheet1
|
|
8
|
+
from reportlab.pdfgen.canvas import Canvas
|
|
9
|
+
from reportlab.pdfgen.textobject import PDFTextObject, _Color
|
|
10
|
+
from reportlab.platypus.flowables import Flowable
|
|
11
|
+
|
|
12
|
+
_T = TypeVar("_T")
|
|
13
|
+
_BoolInt: TypeAlias = Literal[0, 1]
|
|
14
|
+
_Op: TypeAlias = _SupportsWidthAndExecute | str | float | tuple[str, Unpack[tuple[Any, ...]]]
|
|
15
|
+
# NOTE: Output from pyRXP xml parser
|
|
16
|
+
_ParsedText: TypeAlias = tuple[str, dict[str, Any], list[_ParsedText], Any] | list[_ParsedText] | str
|
|
17
|
+
|
|
18
|
+
class _LineOpHandler(Protocol):
|
|
19
|
+
def start_at(self, x: float, y: float, para: paragraphEngine, canvas: Canvas, textobject: PDFTextObject) -> None: ...
|
|
20
|
+
def end_at(self, x: float, y: float, para: paragraphEngine, canvas: Canvas, textobject: PDFTextObject) -> None: ...
|
|
21
|
+
|
|
22
|
+
class _SupportsWidthAndExecute(Protocol):
|
|
23
|
+
def width(self, engine) -> float: ...
|
|
24
|
+
def execute(self, engine, textobject: PDFTextObject, canvas: Canvas) -> object: ...
|
|
25
|
+
|
|
26
|
+
class _SimpleStyleKwargs(TypedDict, total=False):
|
|
27
|
+
fontName: str
|
|
28
|
+
fontSize: float
|
|
29
|
+
leading: float
|
|
30
|
+
leftIndent: float
|
|
31
|
+
rightIndent: float
|
|
32
|
+
firstLineIndent: float
|
|
33
|
+
alignment: Literal[0, 1, 2, 4]
|
|
34
|
+
spaceBefore: float
|
|
35
|
+
spaceAfter: float
|
|
36
|
+
bulletFontName: str
|
|
37
|
+
bulletFontSize: float
|
|
38
|
+
bulletIndent: float
|
|
39
|
+
textColor: _Color
|
|
40
|
+
backColor: _Color | None
|
|
41
|
+
|
|
42
|
+
debug: int
|
|
43
|
+
DUMPPROGRAM: int
|
|
44
|
+
TOOSMALLSPACE: float
|
|
45
|
+
|
|
46
|
+
class paragraphEngine:
|
|
47
|
+
TEXT_STATE_VARIABLES: Final[tuple[str, ...]]
|
|
48
|
+
lineOpHandlers: list[_LineOpHandler]
|
|
49
|
+
program: list[_Op]
|
|
50
|
+
indent: float
|
|
51
|
+
baseindent: float
|
|
52
|
+
fontName: str
|
|
53
|
+
fontSize: float
|
|
54
|
+
leading: float
|
|
55
|
+
fontColor: _Color
|
|
56
|
+
x: float
|
|
57
|
+
y: float
|
|
58
|
+
alignment: Literal[0, 1, 2, 4]
|
|
59
|
+
# NOTE: The inner list matches TEXT_STATE_VARIABLES
|
|
60
|
+
textStateStack: list[list[Any]]
|
|
61
|
+
def __init__(self, program: list[_Op] | None = None) -> None: ...
|
|
62
|
+
def pushTextState(self) -> list[Any]: ...
|
|
63
|
+
def popTextState(self) -> None: ...
|
|
64
|
+
def format(
|
|
65
|
+
self, maxwidth: float, maxheight: float, program: list[_Op], leading: float = 0
|
|
66
|
+
) -> tuple[list[_Op], str, dict[str, Any], float]: ...
|
|
67
|
+
def getState(self) -> dict[str, Any]: ...
|
|
68
|
+
def resetState(self, state: dict[str, Any]) -> None: ...
|
|
69
|
+
def fitLine(
|
|
70
|
+
self, program: list[_Op], totalLength: float
|
|
71
|
+
) -> tuple[Literal[0, 1], list[_Op], int, float, float, float, Literal[0, 1]]: ...
|
|
72
|
+
def centerAlign(self, line: list[_Op], lineLength: float, maxLength: float) -> list[_Op]: ...
|
|
73
|
+
def rightAlign(self, line: list[_Op], lineLength: float, maxLength: float) -> list[_Op]: ...
|
|
74
|
+
def insertShift(self, line: list[_Op], shift: float) -> list[_Op]: ...
|
|
75
|
+
def justifyAlign(self, line: list[_Op], lineLength: float, maxLength: float) -> list[_Op]: ...
|
|
76
|
+
def shrinkWrap(self, line: list[_Op]) -> list[_Op]: ...
|
|
77
|
+
def cleanProgram(self, line: list[_Op]) -> list[_Op]: ...
|
|
78
|
+
def runOpCodes(self, program: list[_Op], canvas: Canvas, textobject: PDFTextObject) -> dict[str, Any]: ...
|
|
79
|
+
|
|
80
|
+
def stringLine(line: list[_Op], length: float) -> list[_Op]: ...
|
|
81
|
+
def simpleJustifyAlign(line: list[_Op], currentLength: float, maxLength: float) -> list[_Op]: ...
|
|
82
|
+
def readBool(text: str) -> _BoolInt: ...
|
|
83
|
+
def readAlignment(text: str) -> Literal[0, 1, 2, 4] | None: ...
|
|
84
|
+
def readLength(text: str) -> float: ...
|
|
85
|
+
@overload
|
|
86
|
+
def lengthSequence(s: str, converter: Callable[[str], float] = ...) -> list[float]: ...
|
|
87
|
+
@overload
|
|
88
|
+
def lengthSequence(s: str, converter: Callable[[str], _T]) -> list[_T]: ...
|
|
89
|
+
def readColor(text: str | None) -> Color | None: ...
|
|
90
|
+
|
|
91
|
+
class StyleAttributeConverters:
|
|
92
|
+
fontSize: list[Callable[[str], float]]
|
|
93
|
+
leading: list[Callable[[str], float]]
|
|
94
|
+
leftIndent: list[Callable[[str], float]]
|
|
95
|
+
rightIndent: list[Callable[[str], float]]
|
|
96
|
+
firstLineIndent: list[Callable[[str], float]]
|
|
97
|
+
alignment: list[Callable[[str], Literal[0, 1, 2, 4] | None]]
|
|
98
|
+
spaceBefore: list[Callable[[str], float]]
|
|
99
|
+
spaceAfter: list[Callable[[str], float]]
|
|
100
|
+
bulletFontSize: list[Callable[[str], float]]
|
|
101
|
+
bulletIndent: list[Callable[[str], float]]
|
|
102
|
+
textColor: list[Callable[[str], Color | None]]
|
|
103
|
+
backColor: list[Callable[[str], Color | None]]
|
|
104
|
+
|
|
105
|
+
class SimpleStyle:
|
|
106
|
+
name: str
|
|
107
|
+
fontName: str
|
|
108
|
+
fontSize: float
|
|
109
|
+
leading: float
|
|
110
|
+
leftIndent: float
|
|
111
|
+
rightIndent: float
|
|
112
|
+
firstLineIndent: float
|
|
113
|
+
alignment: Literal[0, 1, 2, 4]
|
|
114
|
+
spaceBefore: float
|
|
115
|
+
spaceAfter: float
|
|
116
|
+
bulletFontName: str
|
|
117
|
+
bulletFontSize: float
|
|
118
|
+
bulletIndent: float
|
|
119
|
+
textColor: _Color
|
|
120
|
+
backColor: _Color | None
|
|
121
|
+
# NOTE: We are being generous by allowing PropertySet i.e. ParagraphStyle here
|
|
122
|
+
# technically SimpleStyle is more strict and doesn't allow string alignments
|
|
123
|
+
def __init__(self, name: str, parent: SimpleStyle | PropertySet | None = None, **kw: Unpack[_SimpleStyleKwargs]) -> None: ...
|
|
124
|
+
def addAttributes(self, dictionary: Mapping[str, str | None]) -> None: ...
|
|
125
|
+
|
|
126
|
+
DEFAULT_ALIASES: Final[dict[str, str]]
|
|
127
|
+
|
|
128
|
+
class FastPara(Flowable):
|
|
129
|
+
style: SimpleStyle | ParagraphStyle
|
|
130
|
+
simpletext: str
|
|
131
|
+
lines: list[str] | None
|
|
132
|
+
# NOTE: We are being generous by allowing PropertySet i.e. ParagraphStyle here
|
|
133
|
+
# technically SimpleStyle is more strict and doesn't allow string alignments
|
|
134
|
+
def __init__(self, style: SimpleStyle | PropertySet, simpletext: str) -> None: ...
|
|
135
|
+
def draw(self) -> None: ...
|
|
136
|
+
|
|
137
|
+
def defaultContext() -> dict[str, PropertySet]: ...
|
|
138
|
+
def buildContext(stylesheet: StyleSheet1 | None = None) -> dict[str, PropertySet]: ...
|
|
139
|
+
|
|
140
|
+
class Para(Flowable):
|
|
141
|
+
baseindent: float
|
|
142
|
+
context: dict[str, PropertySet]
|
|
143
|
+
parsedText: _ParsedText
|
|
144
|
+
bulletText: str | None
|
|
145
|
+
style1: SimpleStyle | PropertySet
|
|
146
|
+
program: list[_Op]
|
|
147
|
+
formattedProgram: list[_Op]
|
|
148
|
+
remainder: _ParsedText
|
|
149
|
+
state: dict[str, Any]
|
|
150
|
+
bold: _BoolInt
|
|
151
|
+
italic: _BoolInt
|
|
152
|
+
face: str
|
|
153
|
+
size: float
|
|
154
|
+
def __init__(
|
|
155
|
+
self,
|
|
156
|
+
# NOTE: We are being generous by allowing PropertySet i.e. ParagraphStyle here
|
|
157
|
+
# technically SimpleStyle is more strict and doesn't allow string alignments
|
|
158
|
+
style: SimpleStyle | PropertySet,
|
|
159
|
+
parsedText: tuple[Any, ...] | None = None,
|
|
160
|
+
bulletText: str | None = None,
|
|
161
|
+
state: dict[str, Any] | None = None,
|
|
162
|
+
context: dict[str, PropertySet] | None = None,
|
|
163
|
+
baseindent: float = 0,
|
|
164
|
+
) -> None: ...
|
|
165
|
+
def draw(self) -> None: ...
|
|
166
|
+
def compileProgram(self, parsedText: _ParsedText, program: list[_Op] | None = None) -> list[_Op]: ...
|
|
167
|
+
def linearize(self, program: list[_Op] | None = None, parsedText: _ParsedText | None = None) -> None: ...
|
|
168
|
+
def compileComponent(self, parsedText: _ParsedText, program: list[_Op]) -> None: ...
|
|
169
|
+
def shiftfont(
|
|
170
|
+
self, program: list[_Op], face: str | None = None, bold: _BoolInt | None = None, italic: _BoolInt | None = None
|
|
171
|
+
): ...
|
|
172
|
+
def compile_(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
173
|
+
def compile_pageNumber(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
174
|
+
def compile_b(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
175
|
+
def compile_i(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
176
|
+
def compile_u(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
177
|
+
def compile_sub(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
178
|
+
def compile_ul(self, attdict, content, extra, program: list[_Op], tagname: str = "ul") -> None: ...
|
|
179
|
+
def compile_ol(self, attdict, content, extra, program: list[_Op]): ...
|
|
180
|
+
def compile_dl(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
181
|
+
def compile_super(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
182
|
+
def compile_font(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
183
|
+
def compile_a(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
184
|
+
def compile_link(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
185
|
+
def compile_setLink(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
186
|
+
def compile_bullet(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
187
|
+
def do_bullet(self, text: str, program: list[_Op]) -> None: ...
|
|
188
|
+
def compile_tt(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
189
|
+
def compile_greek(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
190
|
+
def compile_evalString(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
191
|
+
def compile_name(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
192
|
+
def compile_getName(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
193
|
+
def compile_seq(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
194
|
+
def compile_seqReset(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
195
|
+
def compile_seqDefault(self, attdict, content, extra, program: list[_Op]) -> None: ...
|
|
196
|
+
def compile_para(self, attdict, content, extra, program: list[_Op], stylename: str = "para.defaultStyle") -> None: ...
|
|
197
|
+
|
|
198
|
+
class bulletMaker:
|
|
199
|
+
tagname: Literal["ul", "ol", "dl"]
|
|
200
|
+
style: str
|
|
201
|
+
typ: str
|
|
202
|
+
count: int
|
|
203
|
+
def __init__(self, tagname: Literal["ul", "ol", "dl"], atts, context) -> None: ...
|
|
204
|
+
def makeBullet(self, atts, bl: str | None = None) -> None: ...
|
|
205
|
+
|
|
206
|
+
class EvalStringObject:
|
|
207
|
+
tagname: str
|
|
208
|
+
attdict: Incomplete
|
|
209
|
+
content: str
|
|
210
|
+
context: Incomplete
|
|
211
|
+
extra: Incomplete
|
|
212
|
+
op: Incomplete
|
|
213
|
+
def __init__(self, attdict, content: str, extra, context) -> None: ...
|
|
214
|
+
def getOp(self, tuple, engine): ...
|
|
215
|
+
def width(self, engine) -> float: ...
|
|
216
|
+
def execute(self, engine, textobject: PDFTextObject, canvas: Canvas) -> None: ...
|
|
217
|
+
|
|
218
|
+
class SeqObject(EvalStringObject): ...
|
|
219
|
+
class NameObject(EvalStringObject): ...
|
|
220
|
+
class SeqDefaultObject(NameObject): ...
|
|
221
|
+
class SeqResetObject(NameObject): ...
|
|
222
|
+
class GetNameObject(EvalStringObject): ...
|
|
223
|
+
|
|
224
|
+
class PageNumberObject:
|
|
225
|
+
example: str
|
|
226
|
+
def __init__(self, example: str = "XXX") -> None: ...
|
|
227
|
+
def width(self, engine) -> float: ...
|
|
228
|
+
def execute(self, engine, textobject: PDFTextObject, canvas: Canvas) -> None: ...
|
|
229
|
+
|
|
230
|
+
def EmbedInRml2pdf() -> None: ...
|
|
231
|
+
def handleSpecialCharacters(engine, text: str, program: list[_Op] | None = None) -> list[_Op]: ...
|
|
232
|
+
def Paragraph(
|
|
233
|
+
text: str,
|
|
234
|
+
style: SimpleStyle | PropertySet,
|
|
235
|
+
bulletText: str | None = None,
|
|
236
|
+
frags: Unused | None = None,
|
|
237
|
+
context: dict[str, PropertySet] | None = None,
|
|
238
|
+
) -> Para | FastPara: ...
|
|
239
|
+
|
|
240
|
+
class UnderLineHandler:
|
|
241
|
+
color: _Color | None
|
|
242
|
+
# NOTE: available after start_at
|
|
243
|
+
xStart: float
|
|
244
|
+
yStart: float
|
|
245
|
+
def __init__(self, color: _Color | None = None) -> None: ...
|
|
246
|
+
def start_at(self, x: float, y: float, para: paragraphEngine, canvas: Canvas, textobject: PDFTextObject) -> None: ...
|
|
247
|
+
def end_at(self, x: float, y: float, para: paragraphEngine, canvas: Canvas, textobject: PDFTextObject) -> None: ...
|
|
248
|
+
|
|
249
|
+
UNDERLINE: Final[UnderLineHandler]
|
|
250
|
+
|
|
251
|
+
class HotLink(UnderLineHandler):
|
|
252
|
+
url: str
|
|
253
|
+
def __init__(self, url: str) -> None: ...
|
|
254
|
+
def link(self, rect, canvas: Canvas) -> None: ...
|
|
255
|
+
|
|
256
|
+
class InternalLink(HotLink): ...
|
|
257
|
+
|
|
258
|
+
class DefDestination(HotLink):
|
|
259
|
+
defined: _BoolInt
|
|
260
|
+
|
|
261
|
+
def splitspace(text: str) -> list[str]: ...
|
|
262
|
+
|
|
263
|
+
testparagraph: str
|
|
264
|
+
testparagraph1: str
|
|
265
|
+
|
|
266
|
+
def test2(canv, testpara) -> None: ...
|
|
267
|
+
|
|
268
|
+
testlink: Incomplete
|
|
269
|
+
test_program: Incomplete
|
|
270
|
+
|
|
271
|
+
def test() -> None: ...
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from reportlab.lib.abag import ABag
|
|
2
|
+
from reportlab.lib.styles import ParagraphStyle, PropertySet
|
|
3
|
+
from reportlab.pdfgen.textobject import PDFTextObject
|
|
4
|
+
from reportlab.platypus.flowables import Flowable
|
|
5
|
+
from reportlab.platypus.paraparser import ParaFrag
|
|
6
|
+
|
|
7
|
+
class ParaLines(ABag): ...
|
|
8
|
+
class FragLine(ABag): ...
|
|
9
|
+
|
|
10
|
+
def cleanBlockQuotedText(text: str, joiner: str = " ") -> str: ...
|
|
11
|
+
|
|
12
|
+
class Paragraph(Flowable):
|
|
13
|
+
text: str
|
|
14
|
+
frags: list[ParaFrag]
|
|
15
|
+
style: ParagraphStyle
|
|
16
|
+
bulletText: str | None
|
|
17
|
+
caseSensitive: int
|
|
18
|
+
encoding: str
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
text: str,
|
|
22
|
+
# NOTE: This should be a ParagraphStyle
|
|
23
|
+
style: PropertySet | None = None,
|
|
24
|
+
bulletText: str | None = None,
|
|
25
|
+
frags: list[ParaFrag] | None = None,
|
|
26
|
+
caseSensitive: int = 1,
|
|
27
|
+
encoding: str = "utf8",
|
|
28
|
+
) -> None: ...
|
|
29
|
+
def minWidth(self) -> float: ...
|
|
30
|
+
def draw(self) -> None: ...
|
|
31
|
+
def breakLines(self, width: float | list[float] | tuple[float, ...]) -> ParaLines | ParaFrag: ...
|
|
32
|
+
def breakLinesCJK(self, maxWidths: float | list[float] | tuple[float, ...]) -> ParaLines | ParaFrag: ...
|
|
33
|
+
def beginText(self, x: float, y: float) -> PDFTextObject: ...
|
|
34
|
+
def drawPara(self, debug: int = 0) -> None: ...
|
|
35
|
+
def getPlainText(self, identify: bool | None = None) -> str: ...
|
|
36
|
+
def getActualLineWidths0(self) -> list[float]: ...
|
|
37
|
+
@staticmethod
|
|
38
|
+
def dumpFrags(frags, indent: int = 4, full: bool = False) -> str: ...
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from html.parser import HTMLParser
|
|
3
|
+
|
|
4
|
+
from reportlab.lib.abag import ABag
|
|
5
|
+
|
|
6
|
+
__all__ = ("ParaFrag", "ParaParser")
|
|
7
|
+
|
|
8
|
+
class _PCT(float):
|
|
9
|
+
def __new__(cls, v): ...
|
|
10
|
+
def normalizedValue(self, normalizer): ...
|
|
11
|
+
def __copy__(self): ...
|
|
12
|
+
def __deepcopy__(self, mem): ...
|
|
13
|
+
|
|
14
|
+
class _ExValidate:
|
|
15
|
+
tag: Incomplete
|
|
16
|
+
attr: Incomplete
|
|
17
|
+
def __init__(self, tag, attr) -> None: ...
|
|
18
|
+
def invalid(self, s) -> None: ...
|
|
19
|
+
def validate(self, parser, s): ...
|
|
20
|
+
def __call__(self, parser, s): ...
|
|
21
|
+
|
|
22
|
+
class _CheckSup(_ExValidate):
|
|
23
|
+
fontSize: Incomplete
|
|
24
|
+
def validate(self, parser, s): ...
|
|
25
|
+
def __call__(self, parser, s): ...
|
|
26
|
+
|
|
27
|
+
class _CheckUS(_ExValidate):
|
|
28
|
+
def validate(self, parser, s): ...
|
|
29
|
+
|
|
30
|
+
class ParaFrag(ABag): ...
|
|
31
|
+
|
|
32
|
+
class ParaParser(HTMLParser):
|
|
33
|
+
def __getattr__(self, attrName): ...
|
|
34
|
+
def start_b(self, attributes) -> None: ...
|
|
35
|
+
def end_b(self) -> None: ...
|
|
36
|
+
def start_strong(self, attributes) -> None: ...
|
|
37
|
+
def end_strong(self) -> None: ...
|
|
38
|
+
def start_i(self, attributes) -> None: ...
|
|
39
|
+
def end_i(self) -> None: ...
|
|
40
|
+
def start_em(self, attributes) -> None: ...
|
|
41
|
+
def end_em(self) -> None: ...
|
|
42
|
+
def start_u(self, attributes) -> None: ...
|
|
43
|
+
def end_u(self) -> None: ...
|
|
44
|
+
def start_strike(self, attributes) -> None: ...
|
|
45
|
+
def end_strike(self) -> None: ...
|
|
46
|
+
def start_link(self, attributes) -> None: ...
|
|
47
|
+
def end_link(self) -> None: ...
|
|
48
|
+
def start_a(self, attributes) -> None: ...
|
|
49
|
+
def end_a(self) -> None: ...
|
|
50
|
+
def start_img(self, attributes) -> None: ...
|
|
51
|
+
def end_img(self) -> None: ...
|
|
52
|
+
def start_super(self, attributes) -> None: ...
|
|
53
|
+
def end_super(self) -> None: ...
|
|
54
|
+
start_sup = start_super
|
|
55
|
+
end_sup = end_super
|
|
56
|
+
def start_sub(self, attributes) -> None: ...
|
|
57
|
+
def end_sub(self) -> None: ...
|
|
58
|
+
def start_nobr(self, attrs) -> None: ...
|
|
59
|
+
def end_nobr(self) -> None: ...
|
|
60
|
+
def handle_charref(self, name) -> None: ...
|
|
61
|
+
def syntax_error(self, lineno, message) -> None: ...
|
|
62
|
+
def start_greek(self, attr) -> None: ...
|
|
63
|
+
def end_greek(self) -> None: ...
|
|
64
|
+
def start_unichar(self, attr) -> None: ...
|
|
65
|
+
def end_unichar(self) -> None: ...
|
|
66
|
+
def start_font(self, attr) -> None: ...
|
|
67
|
+
def end_font(self) -> None: ...
|
|
68
|
+
def start_span(self, attr) -> None: ...
|
|
69
|
+
def end_span(self) -> None: ...
|
|
70
|
+
def start_br(self, attr) -> None: ...
|
|
71
|
+
def end_br(self) -> None: ...
|
|
72
|
+
def start_para(self, attr) -> None: ...
|
|
73
|
+
def end_para(self) -> None: ...
|
|
74
|
+
bFragList: Incomplete
|
|
75
|
+
def start_bullet(self, attr) -> None: ...
|
|
76
|
+
def end_bullet(self) -> None: ...
|
|
77
|
+
def start_seqdefault(self, attr) -> None: ...
|
|
78
|
+
def end_seqdefault(self) -> None: ...
|
|
79
|
+
def start_seqreset(self, attr) -> None: ...
|
|
80
|
+
def end_seqreset(self) -> None: ...
|
|
81
|
+
def start_seqchain(self, attr) -> None: ...
|
|
82
|
+
end_seqchain = end_seqreset
|
|
83
|
+
def start_seqformat(self, attr) -> None: ...
|
|
84
|
+
end_seqformat = end_seqreset
|
|
85
|
+
start_seqDefault = start_seqdefault
|
|
86
|
+
end_seqDefault = end_seqdefault
|
|
87
|
+
start_seqReset = start_seqreset
|
|
88
|
+
end_seqReset = end_seqreset
|
|
89
|
+
start_seqChain = start_seqchain
|
|
90
|
+
end_seqChain = end_seqchain
|
|
91
|
+
start_seqFormat = start_seqformat
|
|
92
|
+
end_seqFormat = end_seqformat
|
|
93
|
+
def start_seq(self, attr) -> None: ...
|
|
94
|
+
def end_seq(self) -> None: ...
|
|
95
|
+
def start_ondraw(self, attr) -> None: ...
|
|
96
|
+
start_onDraw = start_ondraw
|
|
97
|
+
end_onDraw = end_seq
|
|
98
|
+
end_ondraw = end_seq
|
|
99
|
+
def start_index(self, attr) -> None: ...
|
|
100
|
+
end_index = end_seq
|
|
101
|
+
def start_unknown(self, attr) -> None: ...
|
|
102
|
+
end_unknown = end_seq
|
|
103
|
+
def getAttributes(self, attr, attrMap): ...
|
|
104
|
+
verbose: Incomplete
|
|
105
|
+
caseSensitive: Incomplete
|
|
106
|
+
ignoreUnknownTags: Incomplete
|
|
107
|
+
def __init__(
|
|
108
|
+
self, verbose: int = 0, caseSensitive: int = 0, ignoreUnknownTags: int = 1, crashOnError: bool = True
|
|
109
|
+
) -> None: ...
|
|
110
|
+
def handle_data(self, data) -> None: ...
|
|
111
|
+
def handle_cdata(self, data) -> None: ...
|
|
112
|
+
def tt_parse(self, tt, style): ...
|
|
113
|
+
def findSpanStyle(self, style) -> None: ...
|
|
114
|
+
def parse(self, text, style): ...
|
|
115
|
+
def handle_starttag(self, tag, attrs) -> None: ...
|
|
116
|
+
def handle_endtag(self, tag) -> None: ...
|
|
117
|
+
def handle_entityref(self, name) -> None: ...
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
from _typeshed import Unused
|
|
2
|
+
from collections.abc import Callable, Iterable, Sequence
|
|
3
|
+
from typing import Any, Final, Literal, TypedDict, TypeVar, overload
|
|
4
|
+
from typing_extensions import TypeAlias, Unpack
|
|
5
|
+
|
|
6
|
+
from reportlab.lib.styles import ParagraphStyle, PropertySet
|
|
7
|
+
from reportlab.pdfgen.canvas import Canvas
|
|
8
|
+
from reportlab.platypus.doctemplate import IndexingFlowable, _CanvasMaker
|
|
9
|
+
from reportlab.platypus.tables import TableStyle
|
|
10
|
+
|
|
11
|
+
_T = TypeVar("_T")
|
|
12
|
+
_Entry: TypeAlias = tuple[int, str, int] | tuple[int, str, int, str | None] | Sequence[int | str | None]
|
|
13
|
+
_SequencerFormat: TypeAlias = Literal["I", "i", "123", "ABC", "abc"]
|
|
14
|
+
|
|
15
|
+
class _TableOfContentsKwargs(TypedDict, total=False):
|
|
16
|
+
rightColumnWidth: float
|
|
17
|
+
levelStyles: list[PropertySet] # should be ParagraphStyle
|
|
18
|
+
tableStyle: TableStyle
|
|
19
|
+
dotsMinLevel: int
|
|
20
|
+
formatter: Callable[[int], str] | None
|
|
21
|
+
|
|
22
|
+
class _SimpleIndexKwargs(TypedDict, total=False):
|
|
23
|
+
style: Iterable[PropertySet] | PropertySet | None # should be ParagraphStyle
|
|
24
|
+
dot: str | None
|
|
25
|
+
tableStyle: TableStyle | None
|
|
26
|
+
headers: bool
|
|
27
|
+
name: str | None
|
|
28
|
+
format: _SequencerFormat
|
|
29
|
+
offset: int
|
|
30
|
+
|
|
31
|
+
__version__: Final[str]
|
|
32
|
+
|
|
33
|
+
def unquote(txt: str) -> str: ...
|
|
34
|
+
def drawPageNumbers(
|
|
35
|
+
canvas: Canvas,
|
|
36
|
+
style: PropertySet, # should be ParagraphStyle
|
|
37
|
+
pages: Iterable[tuple[int | str, Unused]],
|
|
38
|
+
availWidth: float,
|
|
39
|
+
availHeight: float,
|
|
40
|
+
dot: str = " . ",
|
|
41
|
+
formatter: Unused | None = None,
|
|
42
|
+
) -> None: ...
|
|
43
|
+
|
|
44
|
+
delta: float
|
|
45
|
+
epsilon: float
|
|
46
|
+
defaultLevelStyles: list[ParagraphStyle]
|
|
47
|
+
defaultTableStyle: TableStyle
|
|
48
|
+
|
|
49
|
+
class TableOfContents(IndexingFlowable):
|
|
50
|
+
rightColumnWidth: float
|
|
51
|
+
levelStyles: list[ParagraphStyle]
|
|
52
|
+
tableStyle: TableStyle
|
|
53
|
+
dotsMinLevel: int
|
|
54
|
+
formatter: Callable[[int], str] | None
|
|
55
|
+
def __init__(self, **kwds: Unpack[_TableOfContentsKwargs]) -> None: ...
|
|
56
|
+
def isIndexing(self) -> Literal[1]: ...
|
|
57
|
+
def isSatisfied(self) -> bool: ...
|
|
58
|
+
def clearEntries(self) -> None: ...
|
|
59
|
+
def getLevelStyle(self, n: int) -> ParagraphStyle: ...
|
|
60
|
+
def addEntry(self, level: int, text: str, pageNum: int, key: str | None = None) -> None: ...
|
|
61
|
+
def addEntries(self, listOfEntries: Iterable[_Entry]) -> None: ...
|
|
62
|
+
|
|
63
|
+
@overload
|
|
64
|
+
def makeTuple(x: tuple[_T, ...]) -> tuple[_T, ...]: ...
|
|
65
|
+
@overload
|
|
66
|
+
def makeTuple(x: list[_T]) -> tuple[_T, ...]: ...
|
|
67
|
+
@overload
|
|
68
|
+
def makeTuple(x: _T) -> tuple[_T, ...]: ...
|
|
69
|
+
|
|
70
|
+
class SimpleIndex(IndexingFlowable):
|
|
71
|
+
# NOTE: Will be a list after getLevelStyle is called
|
|
72
|
+
textStyle: ParagraphStyle | Iterable[ParagraphStyle] | list[ParagraphStyle]
|
|
73
|
+
tableStyle: TableStyle
|
|
74
|
+
dot: str | None
|
|
75
|
+
headers: bool
|
|
76
|
+
name: str
|
|
77
|
+
formatFunc: Callable[[int], str]
|
|
78
|
+
offset: float
|
|
79
|
+
def __init__(self, **kwargs: Unpack[_SimpleIndexKwargs]) -> None: ...
|
|
80
|
+
def getFormatFunc(self, formatName): ...
|
|
81
|
+
def setup(
|
|
82
|
+
self,
|
|
83
|
+
style: PropertySet | None = None, # should be ParagraphStyle
|
|
84
|
+
dot: str | None = None,
|
|
85
|
+
tableStyle: TableStyle | None = None,
|
|
86
|
+
headers: bool = True,
|
|
87
|
+
name: str | None = None,
|
|
88
|
+
format: _SequencerFormat = "123",
|
|
89
|
+
offset: float = 0,
|
|
90
|
+
) -> None: ...
|
|
91
|
+
def __call__(self, canv: Canvas, kind: str | None, label: str) -> None: ...
|
|
92
|
+
def getCanvasMaker(self, canvasmaker: _CanvasMaker = ...) -> _CanvasMaker: ...
|
|
93
|
+
def isIndexing(self) -> Literal[1]: ...
|
|
94
|
+
def isSatisfied(self) -> bool: ...
|
|
95
|
+
def clearEntries(self) -> None: ...
|
|
96
|
+
def addEntry(self, text: str, pageNum: tuple[int, str], key: str | None = None) -> None: ...
|
|
97
|
+
def draw(self) -> None: ...
|
|
98
|
+
def getLevelStyle(self, n: int) -> ParagraphStyle: ...
|
|
99
|
+
|
|
100
|
+
AlphabeticIndex = SimpleIndex
|
|
101
|
+
|
|
102
|
+
def listdiff(l1: list[Any], l2: list[_T]) -> tuple[int, list[_T]]: ...
|
|
103
|
+
|
|
104
|
+
class ReferenceText(IndexingFlowable):
|
|
105
|
+
textPattern: str
|
|
106
|
+
target: str
|
|
107
|
+
paraStyle: ParagraphStyle
|
|
108
|
+
def __init__(self, textPattern: str, targetKey: str) -> None: ...
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from abc import abstractmethod
|
|
3
|
+
from collections.abc import Collection, Iterable, Sequence
|
|
4
|
+
from typing import Any, Literal, overload
|
|
5
|
+
from typing_extensions import TypeAlias, Unpack
|
|
6
|
+
|
|
7
|
+
from reportlab.lib.colors import Color
|
|
8
|
+
from reportlab.lib.styles import PropertySet
|
|
9
|
+
from reportlab.lib.utils import _UNSET_
|
|
10
|
+
from reportlab.platypus.flowables import Flowable, _HAlignment, _VAlignment
|
|
11
|
+
|
|
12
|
+
__all__ = ("Table", "TableStyle", "CellStyle", "LongTable")
|
|
13
|
+
|
|
14
|
+
_Color: TypeAlias = Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float] | str | int
|
|
15
|
+
# TODO: consider creating a tagged union of all the possible commands, although
|
|
16
|
+
# this would restrict us to passing cmds to TableStyle.__init__ in a tuple
|
|
17
|
+
# since a list would not be able to be inferred correctly
|
|
18
|
+
# All commands are a tuple with a str opcode as the first element, followed
|
|
19
|
+
# by the arguments for that command. Most commands start with two positions
|
|
20
|
+
# indicating the cell-range affected by the command, the only exception is
|
|
21
|
+
# the ROUNDEDCORNERS command which applies to the whole table always.
|
|
22
|
+
_SpecialRow: TypeAlias = Literal["splitfirst", "splitlast", "inrowsplitstart", "inrowsplitend"]
|
|
23
|
+
_TableSectionCommand: TypeAlias = tuple[str, tuple[int | _SpecialRow, int], tuple[int, int], Unpack[tuple[Any, ...]]]
|
|
24
|
+
_CornerRadii: TypeAlias = tuple[float, float, float, float] | list[float]
|
|
25
|
+
_RoundedCornersTableCommand: TypeAlias = tuple[Literal["ROUNDEDCORNERS"], _CornerRadii | None]
|
|
26
|
+
_TableCommand: TypeAlias = _TableSectionCommand | _RoundedCornersTableCommand
|
|
27
|
+
|
|
28
|
+
class CellStyle(PropertySet):
|
|
29
|
+
name: str
|
|
30
|
+
fontname: str
|
|
31
|
+
fontsize: float
|
|
32
|
+
leading: float
|
|
33
|
+
leftPadding: float
|
|
34
|
+
rightPadding: float
|
|
35
|
+
topPadding: float
|
|
36
|
+
bottomPadding: float
|
|
37
|
+
firstLineIndent: float
|
|
38
|
+
color: _Color
|
|
39
|
+
alignment: Literal["LEFT", "CENTER", "CENTRE", "RIGHT", "DECIMAL"]
|
|
40
|
+
background: _Color
|
|
41
|
+
valign: Literal["TOP", "MIDDLE", "BOTTOM"]
|
|
42
|
+
href: str | None
|
|
43
|
+
destination: Incomplete
|
|
44
|
+
def __init__(self, name: str, parent: CellStyle | None = None) -> None: ...
|
|
45
|
+
def copy(self, result: CellStyle | None = None) -> CellStyle: ...
|
|
46
|
+
|
|
47
|
+
class TableStyle:
|
|
48
|
+
# TODO: Add TypedDict for Table properties that can be set through the style
|
|
49
|
+
def __init__(self, cmds: Iterable[_TableCommand] | None = None, parent: TableStyle | None = None, **kw) -> None: ...
|
|
50
|
+
@overload
|
|
51
|
+
def add(self, *cmd: Unpack[_TableSectionCommand]) -> None: ...
|
|
52
|
+
@overload
|
|
53
|
+
def add(self, *cmd: Unpack[_RoundedCornersTableCommand]) -> None: ...
|
|
54
|
+
def getCommands(self) -> list[_TableCommand]: ...
|
|
55
|
+
|
|
56
|
+
class Table(Flowable):
|
|
57
|
+
ident: str | None
|
|
58
|
+
repeatRows: int
|
|
59
|
+
repeatCols: int
|
|
60
|
+
splitByRow: int
|
|
61
|
+
splitInRow: int
|
|
62
|
+
spaceBefore: float
|
|
63
|
+
spaceAfter: float
|
|
64
|
+
def __init__(
|
|
65
|
+
self,
|
|
66
|
+
# NOTE: Technically only list or tuple works but lack of covariance
|
|
67
|
+
# on list makes this too annoying
|
|
68
|
+
data: Sequence[list[Any] | tuple[Any, ...]],
|
|
69
|
+
colWidths: Sequence[float | str | None] | float | str | None = None,
|
|
70
|
+
rowHeights: Sequence[float | None] | float | None = None,
|
|
71
|
+
style: TableStyle | Iterable[_TableCommand] | None = None,
|
|
72
|
+
# docs say list/tuple, but the implementation allows any collection
|
|
73
|
+
repeatRows: int | Collection[int] = 0,
|
|
74
|
+
repeatCols: int | Collection[int] = 0,
|
|
75
|
+
splitByRow: int = 1,
|
|
76
|
+
splitInRow: int = 0,
|
|
77
|
+
emptyTableAction: Literal["error", "indicate", "ignore"] | None = None,
|
|
78
|
+
ident: str | None = None,
|
|
79
|
+
hAlign: _HAlignment | None = None,
|
|
80
|
+
vAlign: _VAlignment | None = None,
|
|
81
|
+
normalizedData: int = 0,
|
|
82
|
+
cellStyles: Sequence[Sequence[CellStyle]] | None = None,
|
|
83
|
+
rowSplitRange: tuple[int, int] | None = None,
|
|
84
|
+
spaceBefore: float | None = None,
|
|
85
|
+
spaceAfter: float | None = None,
|
|
86
|
+
longTableOptimize: Incomplete | None = None,
|
|
87
|
+
minRowHeights: Sequence[float] | None = None,
|
|
88
|
+
cornerRadii: _CornerRadii | _UNSET_ | None = ...,
|
|
89
|
+
renderCB: TableRenderCB | None = None,
|
|
90
|
+
) -> None: ...
|
|
91
|
+
def identity(self, maxLen: int | None = 30) -> str: ...
|
|
92
|
+
def normalizeData(self, data: Iterable[Iterable[Any]]) -> list[list[Any]]: ...
|
|
93
|
+
def minWidth(self) -> float: ...
|
|
94
|
+
def setStyle(self, tblstyle: TableStyle | Iterable[_TableCommand]) -> None: ...
|
|
95
|
+
def normCellRange(self, sc: int, ec: int, sr: int, er: int) -> tuple[int, int, int, int]: ...
|
|
96
|
+
def onSplit(self, T: Table, byRow: int = 1) -> None: ...
|
|
97
|
+
def draw(self) -> None: ...
|
|
98
|
+
|
|
99
|
+
class LongTable(Table): ...
|
|
100
|
+
|
|
101
|
+
class TableRenderCB:
|
|
102
|
+
def __call__(self, T: Table, cmd: str, *args: Any) -> None: ...
|
|
103
|
+
@abstractmethod
|
|
104
|
+
def startTable(self, T: Table) -> None: ...
|
|
105
|
+
@abstractmethod
|
|
106
|
+
def startBG(self, T: Table) -> None: ...
|
|
107
|
+
@abstractmethod
|
|
108
|
+
def endBG(self, T: Table) -> None: ...
|
|
109
|
+
@abstractmethod
|
|
110
|
+
def startRow(self, T: Table, rowNo: int) -> None: ...
|
|
111
|
+
@abstractmethod
|
|
112
|
+
def startCell(
|
|
113
|
+
self, T: Table, rowNo: int, colNo: int, cellval: Any, cellstyle: CellStyle, pos: tuple[int, int], size: tuple[int, int]
|
|
114
|
+
) -> None: ...
|
|
115
|
+
@abstractmethod
|
|
116
|
+
def endCell(self, T: Table) -> None: ...
|
|
117
|
+
@abstractmethod
|
|
118
|
+
def endRow(self, T: Table) -> None: ...
|
|
119
|
+
@abstractmethod
|
|
120
|
+
def startLines(self, T: Table) -> None: ...
|
|
121
|
+
@abstractmethod
|
|
122
|
+
def endLines(self, T: Table) -> None: ...
|
|
123
|
+
@abstractmethod
|
|
124
|
+
def endTable(self, T: Table) -> None: ...
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from reportlab.lib.styles import PropertySet
|
|
2
|
+
from reportlab.platypus.paragraph import Paragraph, ParaLines
|
|
3
|
+
from reportlab.platypus.paraparser import ParaFrag
|
|
4
|
+
|
|
5
|
+
class XPreformatted(Paragraph):
|
|
6
|
+
def __init__(
|
|
7
|
+
self,
|
|
8
|
+
text: str,
|
|
9
|
+
# NOTE: This should be a ParagraphStyle
|
|
10
|
+
style: PropertySet,
|
|
11
|
+
bulletText: str | None = None,
|
|
12
|
+
frags: list[ParaFrag] | None = None,
|
|
13
|
+
caseSensitive: int = 1,
|
|
14
|
+
dedent: int = 0,
|
|
15
|
+
) -> None: ...
|
|
16
|
+
def breakLinesCJK(self, width: float | list[float] | tuple[float, ...]) -> ParaLines | ParaFrag: ...
|
|
17
|
+
|
|
18
|
+
class PythonPreformatted(XPreformatted):
|
|
19
|
+
formats: dict[str, tuple[str, str]]
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
text: str,
|
|
23
|
+
# NOTE: This should be a ParagraphStyle
|
|
24
|
+
style: PropertySet,
|
|
25
|
+
bulletText: str | None = None,
|
|
26
|
+
dedent: int = 0,
|
|
27
|
+
frags: list[ParaFrag] | None = None,
|
|
28
|
+
) -> None: ...
|
|
29
|
+
def escapeHtml(self, text: str) -> str: ...
|
|
30
|
+
def fontify(self, code: str) -> str: ...
|