Skip to content

Commit

Permalink
run import-analyzer, add/update __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Mar 14, 2024
1 parent 80a642e commit 4e1f1c6
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyglossary/gregorian.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from datetime import datetime

__all__ = ["jd_to", "to_jd"]
__all__ = ["isLeap", "jd_to", "to_jd"]

name = "gregorian"
desc = "Gregorian"
Expand Down
16 changes: 15 additions & 1 deletion pyglossary/slob.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,21 @@
if TYPE_CHECKING:
from .icu_types import T_Collator

__all__ = ["MIME_HTML", "MIME_TEXT", "Writer", "open"]
__all__ = [
"MAX_TEXT_LEN",
"MAX_TINY_TEXT_LEN",
"MIME_HTML",
"MIME_TEXT",
"MultiFileReader",
"UnknownEncoding",
"Writer",
"encodings",
"fopen",
"open",
"read_byte_string",
"read_header",
"sortkey",
]

DEFAULT_COMPRESSION = "lzma2"

Expand Down
1 change: 1 addition & 0 deletions pyglossary/text_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"uint64FromBytes",
"uint64ToBytes",
"uintFromBytes",
"unescapeBar",
"unescapeNTB",
"urlToPath",
]
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
from pyglossary.sort_keys import lookupSortKey, namedSortKeyList
from pyglossary.ui.base import UIBase

__all__ = ["main"]

# the first thing to do is to set up logger.
# other modules also using logger "root", so it is essential to set it up prior
# to importing anything else; with exception to pyglossary.core which sets up
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/ui/tools/diff_glossary.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
if TYPE_CHECKING:
from pyglossary.glossary_types import EntryType

__all__ = ["diffGlossary"]

Glossary.init()

log.setVerbosity(1)
Expand Down
2 changes: 2 additions & 0 deletions tests/g_stardict_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from pyglossary.glossary import Glossary

__all__ = ["TestGlossaryStarDictBase"]


class TestGlossaryStarDictBase(TestGlossaryErrorsBase):
def convert_txt_stardict(
Expand Down
3 changes: 3 additions & 0 deletions tests/glossary_errors_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from pyglossary.glossary import Glossary
from pyglossary.os_utils import rmtree

__all__ = ["TestGlossaryErrors", "TestGlossaryErrorsBase"]


Glossary.init()


Expand Down
3 changes: 3 additions & 0 deletions tests/glossary_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
from pyglossary.os_utils import rmtree
from pyglossary.text_utils import crc32hex

__all__ = ["TestGlossaryBase", "appTmpDir"]


tracemalloc.start()

Glossary.init()
Expand Down
3 changes: 3 additions & 0 deletions tests/glossary_v2_errors_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from pyglossary.glossary_v2 import ConvertArgs, Glossary
from pyglossary.os_utils import rmtree

__all__ = ["TestGlossaryErrorsBase"]


Glossary.init()


Expand Down
2 changes: 2 additions & 0 deletions tests/glossary_v2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from pyglossary.os_utils import rmtree
from pyglossary.text_utils import crc32hex

__all__ = ["TestGlossaryBase", "appTmpDir", "testCacheDir"]

tracemalloc.start()

Glossary.init()
Expand Down

0 comments on commit 4e1f1c6

Please sign in to comment.