Skip to content

Commit cfdff16

Browse files
authored
Drop Python 2 support from chardet (#7708)
1 parent 03e1e3b commit cfdff16

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

stubs/chardet/METADATA.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
version = "4.0.*"
2-
python2 = true
3-
requires = []

stubs/chardet/chardet/enums.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
class InputState(object):
1+
class InputState:
22
PURE_ASCII: int
33
ESC_ASCII: int
44
HIGH_BYTE: int
55

6-
class LanguageFilter(object):
6+
class LanguageFilter:
77
CHINESE_SIMPLIFIED: int
88
CHINESE_TRADITIONAL: int
99
JAPANESE: int
@@ -13,25 +13,25 @@ class LanguageFilter(object):
1313
CHINESE: int
1414
CJK: int
1515

16-
class ProbingState(object):
16+
class ProbingState:
1717
DETECTING: int
1818
FOUND_IT: int
1919
NOT_ME: int
2020

21-
class MachineState(object):
21+
class MachineState:
2222
START: int
2323
ERROR: int
2424
ITS_ME: int
2525

26-
class SequenceLikelihood(object):
26+
class SequenceLikelihood:
2727
NEGATIVE: int
2828
UNLIKELY: int
2929
LIKELY: int
3030
POSITIVE: int
3131
@classmethod
3232
def get_num_categories(cls) -> int: ...
3333

34-
class CharacterCategory(object):
34+
class CharacterCategory:
3535
UNDEFINED: int
3636
LINE_BREAK: int
3737
SYMBOL: int

stubs/chardet/chardet/universaldetector.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class _IntermediateResultType(TypedDict):
1212
confidence: float
1313
language: str | None
1414

15-
class UniversalDetector(object):
15+
class UniversalDetector:
1616
MINIMUM_THRESHOLD: float
1717
HIGH_BYTE_DETECTOR: Pattern[bytes]
1818
ESC_DETECTOR: Pattern[bytes]

0 commit comments

Comments
 (0)