Skip to content

Commit

Permalink
add or update __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Dec 26, 2024
1 parent 690a3f8 commit b52f9c8
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyglossary/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@


__all__ = [
"TRACE",
"StdLogHandler",
"format_exception",
]
Expand Down
2 changes: 1 addition & 1 deletion pyglossary/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
)
from .plugin_prop import PluginProp

__all__ = ["PluginManager"]
__all__ = ["DetectedFormat", "PluginManager"]

log = logging.getLogger("pyglossary")

Expand Down
3 changes: 3 additions & 0 deletions pyglossary/plugins/freedict/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
StrOption,
)

__all__ = ["optionsProp"]


optionsProp: "dict[str, Option]" = {
"resources": BoolOption(
comment="Enable resources / data files",
Expand Down
3 changes: 3 additions & 0 deletions pyglossary/plugins/freedict/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions pyglossary/plugins/freedict/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
10 changes: 10 additions & 0 deletions pyglossary/plugins/quickdic6/commons.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/plugins/quickdic6/comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/plugins/quickdic6/quickdic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
if TYPE_CHECKING:
from .commons import EntryIndexTuple, IndexEntryType

__all__ = ["QuickDic"]


class QuickDic:
def __init__( # noqa: PLR0913
Expand Down
12 changes: 12 additions & 0 deletions pyglossary/plugins/quickdic6/read_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/plugins/quickdic6/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
read_string,
)

__all__ = ["Reader"]


class Reader:
depends = {
Expand Down
12 changes: 12 additions & 0 deletions pyglossary/plugins/quickdic6/write_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 3 additions & 0 deletions pyglossary/plugins/quickdic6/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
write_string,
)

__all__ = ["Writer"]


default_de_normalizer_rules = (
":: Lower; 'ae' > 'ä'; 'oe' > 'ö'; 'ue' > 'ü'; 'ß' > 'ss'; "
)
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/sort_keys_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def __call__(


__all__ = [
"LocaleSQLiteSortKeyMakerType",
"LocaleSortKeyMakerType",
"SQLiteSortKeyMakerType",
"SQLiteSortKeyType",
"SortKeyMakerType",
"SortKeyType",
Expand Down
2 changes: 1 addition & 1 deletion tests/glossary_v2_errors_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b52f9c8

Please sign in to comment.