Skip to content

Commit c31c116

Browse files
committed
Use str
1 parent 8f4e68e commit c31c116

5 files changed

Lines changed: 11 additions & 16 deletions

File tree

stubs/reportlab/reportlab/lib/rl_accel.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
from _typeshed import Incomplete
22
from typing import Literal
3-
from typing_extensions import LiteralString
43

5-
def fp_str(*a) -> LiteralString: ...
4+
def fp_str(*a) -> str: ...
65
def unicode2T1(utext, fonts) -> list[tuple[Incomplete, Incomplete]]: ...
76
def instanceStringWidthT1(self, text: str, size: float, encoding: str = "utf8") -> float: ...
87
def instanceStringWidthTTF(self, text: str, size: float, encoding: str = "utf8") -> float: ...
98
def hex32(i) -> str: ...
109
def add32(x: int, y: int) -> int: ...
1110
def calcChecksum(data: str | bytes) -> int: ...
12-
def escapePDF(s) -> LiteralString: ...
13-
def asciiBase85Encode(input: str) -> LiteralString: ...
11+
def escapePDF(s) -> str: ...
12+
def asciiBase85Encode(input: str) -> str: ...
1413
def asciiBase85Decode(input) -> bytes: ...
1514
def sameFrag(f, g) -> bool | Literal[0]: ...
1615

stubs/reportlab/reportlab/pdfbase/acroform.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from _typeshed import Incomplete
2-
from typing_extensions import LiteralString
32
from weakref import ReferenceType
43

54
from reportlab.pdfbase.pdfdoc import PDFDictionary, PDFObject, PDFStream
@@ -12,7 +11,7 @@ fieldFlagValues: dict[str, int]
1211
annotationFlagValues: dict[str, int]
1312

1413
def bsPDF(borderWidth: int, borderStyle: str, dashLen) -> PDFDictionary: ...
15-
def escPDF(s) -> LiteralString: ...
14+
def escPDF(s) -> str: ...
1615
def makeFlags(s: int | str, d: dict[str, int] = ...) -> int: ...
1716

1817
class PDFFromString(PDFObject):
@@ -41,8 +40,8 @@ class AcroForm(PDFObject):
4140
def fontRef(self, f) -> str: ...
4241
def format(self, doc) -> bytes: ...
4342
def colorTuple(self, c): ...
44-
def streamFillColor(self, c) -> LiteralString: ...
45-
def streamStrokeColor(self, c) -> LiteralString: ...
43+
def streamFillColor(self, c) -> str: ...
44+
def streamStrokeColor(self, c) -> str: ...
4645
def checkboxAP(
4746
self,
4847
key,

stubs/reportlab/reportlab/pdfbase/cidfonts.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
22
from typing import Final, Literal
3-
from typing_extensions import LiteralString
43

54
from reportlab.pdfbase import pdfmetrics
65

@@ -34,7 +33,7 @@ class CIDFont(pdfmetrics.Font):
3433
isVertical: bool
3534
substitutionFonts: list[Incomplete]
3635
def __init__(self, face, encoding) -> None: ...
37-
def formatForPdf(self, text) -> LiteralString: ...
36+
def formatForPdf(self, text) -> str: ...
3837
def stringWidth(self, text, size, encoding=None) -> float: ...
3938
def addObjects(self, doc) -> None: ...
4039

@@ -46,7 +45,7 @@ class UnicodeCIDFont(CIDFont):
4645
isHalfWidth: bool
4746
unicodeWidths: Incomplete
4847
def __init__(self, face: str, isVertical: bool = False, isHalfWidth: bool = False) -> None: ...
49-
def formatForPdf(self, text) -> LiteralString: ...
48+
def formatForPdf(self, text) -> str: ...
5049
def stringWidth(self, text, size, encoding=None) -> float: ...
5150

5251
def precalculate(cmapdir) -> None: ...

stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ from _typeshed import Incomplete
22
from abc import abstractmethod
33
from collections.abc import Callable, Iterable, Mapping
44
from typing import Any, Final, Literal, TypeVar, overload
5-
from typing_extensions import LiteralString
65

76
_T = TypeVar("_T")
87

@@ -116,7 +115,7 @@ class PDFString(PDFObject):
116115
def __init__(self, s: str | bytes | PDFString, escape: int = 1, enc: str = "auto") -> None: ...
117116
def format(self, document) -> bytes: ...
118117

119-
def PDFName(data, lo="!", hi="~") -> LiteralString: ...
118+
def PDFName(data, lo="!", hi="~") -> str: ...
120119

121120
class PDFDictionary(PDFObject):
122121
multiline: bool
@@ -397,7 +396,7 @@ class LinkAnnotation(Annotation):
397396
Destination: Incomplete
398397
otherkw: dict[str, Incomplete]
399398
def __init__(self, Rect, Contents, Destination, Border: str = "[0 0 1]", **kw) -> None: ...
400-
def dummyDictString(self) -> LiteralString: ...
399+
def dummyDictString(self) -> str: ...
401400
def Dict(self) -> PDFDictionary: ...
402401

403402
class HighlightAnnotation(Annotation):

stubs/reportlab/reportlab/pdfbase/pdfmetrics.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete, StrOrBytesPath
22
from typing import Final, Literal
3-
from typing_extensions import LiteralString
43

54
from reportlab.lib.rl_accel import unicode2T1 as unicode2T1
65
from reportlab.pdfbase.pdfdoc import PDFDictionary
@@ -44,7 +43,7 @@ class Encoding:
4443
def isEqual(self, other) -> bool: ...
4544
def modifyRange(self, base, newNames) -> None: ...
4645
def getDifferences(self, otherEnc) -> list[Incomplete]: ...
47-
def makePDFObject(self) -> PDFDictionary | LiteralString: ...
46+
def makePDFObject(self) -> PDFDictionary | str: ...
4847

4948
standardT1SubstitutionFonts: Incomplete
5049

0 commit comments

Comments
 (0)