Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/chardet/enums.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""Enumerations for chardet."""
3from __future__ import annotations
5import enum
8class EncodingEra(enum.IntFlag):
9 """Bit flags representing encoding eras for filtering detection candidates."""
11 MODERN_WEB = 1
12 LEGACY_ISO = 2
13 LEGACY_MAC = 4
14 LEGACY_REGIONAL = 8
15 DOS = 16
16 MAINFRAME = 32
17 ALL = MODERN_WEB | LEGACY_ISO | LEGACY_MAC | LEGACY_REGIONAL | DOS | MAINFRAME
20class LanguageFilter(enum.IntFlag):
21 """Language filter flags for UniversalDetector (chardet 6.x API compat).
23 Accepted but not used — our pipeline does not filter by language group.
25 .. deprecated::
26 Retained only for backward compatibility with chardet 6.x callers.
27 Will be removed in a future major version.
28 """
30 CHINESE_SIMPLIFIED = 0x01
31 CHINESE_TRADITIONAL = 0x02
32 JAPANESE = 0x04
33 KOREAN = 0x08
34 NON_CJK = 0x10
35 ALL = 0x1F
36 CHINESE = CHINESE_SIMPLIFIED | CHINESE_TRADITIONAL
37 CJK = CHINESE | JAPANESE | KOREAN