diff --git a/pyglossary/logger.py b/pyglossary/logger.py index ef11ec654..0a705597c 100644 --- a/pyglossary/logger.py +++ b/pyglossary/logger.py @@ -22,6 +22,7 @@ __all__ = [ + "TRACE", "StdLogHandler", "format_exception", ] diff --git a/pyglossary/plugin_manager.py b/pyglossary/plugin_manager.py index 4bb3d24de..56ec15132 100644 --- a/pyglossary/plugin_manager.py +++ b/pyglossary/plugin_manager.py @@ -37,7 +37,7 @@ ) from .plugin_prop import PluginProp -__all__ = ["PluginManager"] +__all__ = ["DetectedFormat", "PluginManager"] log = logging.getLogger("pyglossary") diff --git a/pyglossary/plugins/freedict/options.py b/pyglossary/plugins/freedict/options.py index 66a2914ce..c753d7007 100644 --- a/pyglossary/plugins/freedict/options.py +++ b/pyglossary/plugins/freedict/options.py @@ -7,6 +7,9 @@ StrOption, ) +__all__ = ["optionsProp"] + + optionsProp: "dict[str, Option]" = { "resources": BoolOption( comment="Enable resources / data files", diff --git a/pyglossary/plugins/freedict/reader.py b/pyglossary/plugins/freedict/reader.py index ef70b1844..3d148c9b7 100644 --- a/pyglossary/plugins/freedict/reader.py +++ b/pyglossary/plugins/freedict/reader.py @@ -24,6 +24,9 @@ from .options import optionsProp from .utils import XMLLANG, ReaderUtils +__all__ = ["Reader"] + + TEI = "{http://www.tei-c.org/ns/1.0}" ENTRY = f"{TEI}entry" INCLUDE = "{http://www.w3.org/2001/XInclude}include" diff --git a/pyglossary/plugins/freedict/utils.py b/pyglossary/plugins/freedict/utils.py index 5e1b413d4..2208504fc 100644 --- a/pyglossary/plugins/freedict/utils.py +++ b/pyglossary/plugins/freedict/utils.py @@ -14,6 +14,9 @@ from pyglossary.langs import langDict from pyglossary.langs.writing_system import getWritingSystemFromText +__all__ = ["XMLLANG", "ReaderUtils"] + + XMLLANG = "{http://www.w3.org/XML/1998/namespace}lang" diff --git a/pyglossary/plugins/quickdic6/commons.py b/pyglossary/plugins/quickdic6/commons.py index 11bf2a940..ae158b44f 100644 --- a/pyglossary/plugins/quickdic6/commons.py +++ b/pyglossary/plugins/quickdic6/commons.py @@ -1,6 +1,16 @@ # -*- coding: utf-8 -*- from __future__ import annotations +__all__ = [ + "HASH_SET_CAPACITY_FACTOR", + "HASH_SET_INIT", + "HASH_SET_INIT2", + "LINKED_HASH_SET_INIT", + "EntryIndexTuple", + "IndexEntryType", +] + + HASH_SET_INIT = ( b"\xac\xed" # magic b"\x00\x05" # version diff --git a/pyglossary/plugins/quickdic6/comparator.py b/pyglossary/plugins/quickdic6/comparator.py index 9a5219fae..383e5d9ae 100644 --- a/pyglossary/plugins/quickdic6/comparator.py +++ b/pyglossary/plugins/quickdic6/comparator.py @@ -6,6 +6,8 @@ if TYPE_CHECKING: from typing import Literal +__all__ = ["Comparator"] + class Comparator: def __init__(self, locale_str: str, normalizer_rules: str, version: int) -> None: diff --git a/pyglossary/plugins/quickdic6/quickdic.py b/pyglossary/plugins/quickdic6/quickdic.py index aeb6e9c94..f2f6edae3 100644 --- a/pyglossary/plugins/quickdic6/quickdic.py +++ b/pyglossary/plugins/quickdic6/quickdic.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from .commons import EntryIndexTuple, IndexEntryType +__all__ = ["QuickDic"] + class QuickDic: def __init__( # noqa: PLR0913 diff --git a/pyglossary/plugins/quickdic6/read_funcs.py b/pyglossary/plugins/quickdic6/read_funcs.py index 0e614706f..644979e55 100644 --- a/pyglossary/plugins/quickdic6/read_funcs.py +++ b/pyglossary/plugins/quickdic6/read_funcs.py @@ -21,6 +21,18 @@ LINKED_HASH_SET_INIT, ) +__all__ = [ + "read_entry_html", + "read_entry_index", + "read_entry_pairs", + "read_entry_source", + "read_entry_text", + "read_int", + "read_list", + "read_long", + "read_string", +] + def read_byte(fp: IO[bytes]) -> int: return struct.unpack(">b", fp.read(1))[0] diff --git a/pyglossary/plugins/quickdic6/reader.py b/pyglossary/plugins/quickdic6/reader.py index 94c53080c..cbd932b41 100644 --- a/pyglossary/plugins/quickdic6/reader.py +++ b/pyglossary/plugins/quickdic6/reader.py @@ -27,6 +27,8 @@ read_string, ) +__all__ = ["Reader"] + class Reader: depends = { diff --git a/pyglossary/plugins/quickdic6/write_funcs.py b/pyglossary/plugins/quickdic6/write_funcs.py index 383d8384f..a8b071afe 100644 --- a/pyglossary/plugins/quickdic6/write_funcs.py +++ b/pyglossary/plugins/quickdic6/write_funcs.py @@ -22,6 +22,18 @@ LINKED_HASH_SET_INIT, ) +__all__ = [ + "write_entry_html", + "write_entry_index", + "write_entry_pairs", + "write_entry_source", + "write_entry_text", + "write_int", + "write_list", + "write_long", + "write_string", +] + def write_int(fp: IO[bytes], val: int) -> int: return fp.write(struct.pack(">i", val)) diff --git a/pyglossary/plugins/quickdic6/writer.py b/pyglossary/plugins/quickdic6/writer.py index acc9c7de0..7fbb47b18 100644 --- a/pyglossary/plugins/quickdic6/writer.py +++ b/pyglossary/plugins/quickdic6/writer.py @@ -24,6 +24,9 @@ write_string, ) +__all__ = ["Writer"] + + default_de_normalizer_rules = ( ":: Lower; 'ae' > 'ä'; 'oe' > 'ö'; 'ue' > 'ü'; 'ß' > 'ss'; " ) diff --git a/pyglossary/sort_keys_types.py b/pyglossary/sort_keys_types.py index f2eadd1eb..c9af66922 100644 --- a/pyglossary/sort_keys_types.py +++ b/pyglossary/sort_keys_types.py @@ -45,7 +45,9 @@ def __call__( __all__ = [ + "LocaleSQLiteSortKeyMakerType", "LocaleSortKeyMakerType", + "SQLiteSortKeyMakerType", "SQLiteSortKeyType", "SortKeyMakerType", "SortKeyType", diff --git a/tests/glossary_v2_errors_test.py b/tests/glossary_v2_errors_test.py index c516dc41b..832adb812 100644 --- a/tests/glossary_v2_errors_test.py +++ b/tests/glossary_v2_errors_test.py @@ -13,7 +13,7 @@ from pyglossary.glossary_v2 import ConvertArgs, Error, Glossary from pyglossary.os_utils import rmtree -__all__ = ["TestGlossaryErrorsBase"] +__all__ = ["TestGlossaryErrors", "TestGlossaryErrorsBase"] Glossary.init()