From cfdff16e4eae0a60537f6c8d26cc4c6eb550ec3c Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 27 Apr 2022 11:54:40 +0200 Subject: [PATCH] Drop Python 2 support from chardet (#7708) --- stubs/chardet/METADATA.toml | 2 -- stubs/chardet/chardet/enums.pyi | 12 ++++++------ stubs/chardet/chardet/universaldetector.pyi | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/stubs/chardet/METADATA.toml b/stubs/chardet/METADATA.toml index 5df22726c..3188e8fc2 100644 --- a/stubs/chardet/METADATA.toml +++ b/stubs/chardet/METADATA.toml @@ -1,3 +1 @@ version = "4.0.*" -python2 = true -requires = [] diff --git a/stubs/chardet/chardet/enums.pyi b/stubs/chardet/chardet/enums.pyi index 08116f112..71c9e10c6 100644 --- a/stubs/chardet/chardet/enums.pyi +++ b/stubs/chardet/chardet/enums.pyi @@ -1,9 +1,9 @@ -class InputState(object): +class InputState: PURE_ASCII: int ESC_ASCII: int HIGH_BYTE: int -class LanguageFilter(object): +class LanguageFilter: CHINESE_SIMPLIFIED: int CHINESE_TRADITIONAL: int JAPANESE: int @@ -13,17 +13,17 @@ class LanguageFilter(object): CHINESE: int CJK: int -class ProbingState(object): +class ProbingState: DETECTING: int FOUND_IT: int NOT_ME: int -class MachineState(object): +class MachineState: START: int ERROR: int ITS_ME: int -class SequenceLikelihood(object): +class SequenceLikelihood: NEGATIVE: int UNLIKELY: int LIKELY: int @@ -31,7 +31,7 @@ class SequenceLikelihood(object): @classmethod def get_num_categories(cls) -> int: ... -class CharacterCategory(object): +class CharacterCategory: UNDEFINED: int LINE_BREAK: int SYMBOL: int diff --git a/stubs/chardet/chardet/universaldetector.pyi b/stubs/chardet/chardet/universaldetector.pyi index 372a4fefa..6926f0428 100644 --- a/stubs/chardet/chardet/universaldetector.pyi +++ b/stubs/chardet/chardet/universaldetector.pyi @@ -12,7 +12,7 @@ class _IntermediateResultType(TypedDict): confidence: float language: str | None -class UniversalDetector(object): +class UniversalDetector: MINIMUM_THRESHOLD: float HIGH_BYTE_DETECTOR: Pattern[bytes] ESC_DETECTOR: Pattern[bytes]