Skip to content

Commit

Permalink
Merge pull request #1 from ilius/master
Browse files Browse the repository at this point in the history
Keep up-to-date
  • Loading branch information
MichaelPetre authored Mar 9, 2024
2 parents 89bb424 + 120ddbb commit 2f74885
Show file tree
Hide file tree
Showing 58 changed files with 409 additions and 402 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ls -l
- name: Download ruff
run: |
wget -c https://github.com/astral-sh/ruff/releases/download/v0.2.2/ruff-0.2.2-x86_64-unknown-linux-gnu.tar.gz
wget -c https://github.com/astral-sh/ruff/releases/download/v0.3.0/ruff-0.3.0-x86_64-unknown-linux-gnu.tar.gz
tar -xzf ruff-*.tar.gz
ls -l ruff
chmod a+x ruff
Expand Down
2 changes: 2 additions & 0 deletions pyglossary/langs/writing_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"writingSystemList",
]


class WritingSystem(NamedTuple):
name: str
iso: list[tuple[int, str]] | list[tuple[int, str, str]] = []
Expand All @@ -26,6 +27,7 @@ class WritingSystem(NamedTuple):
# scripts are separated into multiple groups based on their popularity
# (usage in multiple live languages, and number of native speakers)


writingSystemList = [
WritingSystem(
name="Latin",
Expand Down
1 change: 1 addition & 0 deletions pyglossary/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

log = logging.getLogger("pyglossary")


class DetectedFormat(NamedTuple):
filename: str
formatName: str
Expand Down
19 changes: 10 additions & 9 deletions pyglossary/plugins/aard2_slob.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
)

__all__ = [
"enable",
"lname",
"format",
"Reader",
"Writer",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"Writer",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down Expand Up @@ -110,6 +110,7 @@
t_edition,
}


class Reader:
depends = {
"icu": "PyICU", # >=1.5
Expand Down
16 changes: 8 additions & 8 deletions pyglossary/plugins/abc_medical_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@


__all__ = [
"enable",
"lname",
"format",
"Reader",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
16 changes: 8 additions & 8 deletions pyglossary/plugins/almaany.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
from pyglossary.glossary_types import EntryType, GlossaryType

__all__ = [
"enable",
"lname",
"format",
"Reader",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
16 changes: 8 additions & 8 deletions pyglossary/plugins/appledict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@
from collections.abc import Generator

__all__ = [
"enable",
"lname",
"format",
"Writer",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Writer",
"singleFile",
"website",
"wiki",
]

sys.setrecursionlimit(10000)
Expand Down
16 changes: 8 additions & 8 deletions pyglossary/plugins/appledict_bin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@
from pyglossary.option import BoolOption, Option

__all__ = [
"enable",
"lname",
"format",
"Reader",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
1 change: 1 addition & 0 deletions pyglossary/plugins/appledict_bin/appledict_file_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
APPLEDICT_FILE_OFFSET = 0x40
# addressing of AppleDict binary files always ignores first 0x40 bytes


def readIntPair(buffer: "io.BufferedIOBase") -> "tuple[int, int]":
# to satisfy mymy, put them in vars with declared type
a: int
Expand Down
1 change: 1 addition & 0 deletions pyglossary/plugins/appledict_bin/article_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

__all__ = ["ArticleAddress"]


class ArticleAddress(NamedTuple):
sectionOffset: int
chunkOffset: int
Expand Down
18 changes: 9 additions & 9 deletions pyglossary/plugins/ayandict_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
from pyglossary.option import BoolOption, Option

__all__ = [
"enable",
"lname",
"format",
"Reader",
"Writer",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"Writer",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
14 changes: 7 additions & 7 deletions pyglossary/plugins/babylon_bdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
from pyglossary.option import Option

__all__ = [
"enable",
"lname",
"format",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"singleFile",
"website",
"wiki",
]

enable = False
Expand Down
24 changes: 12 additions & 12 deletions pyglossary/plugins/babylon_bgl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
from .bgl_reader import optionsProp

__all__ = [
"enable",
"lname",
"format",
"description",
"extensions",
"extensionCreate",
"singleFile",
"kind",
"wiki",
"website",
"optionsProp",
"Reader",
"Reader",
"description",
"enable",
"extensionCreate",
"extensions",
"format",
"kind",
"lname",
"optionsProp",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
16 changes: 8 additions & 8 deletions pyglossary/plugins/cc_cedict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@


__all__ = [
"enable",
"lname",
"format",
"Reader",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
16 changes: 8 additions & 8 deletions pyglossary/plugins/cc_kedict.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
from pyglossary.text_reader import TextGlossaryReader

__all__ = [
"enable",
"lname",
"format",
"Reader",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
18 changes: 9 additions & 9 deletions pyglossary/plugins/crawler_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
)

__all__ = [
"enable",
"lname",
"format",
"Reader",
"Writer",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"Writer",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
18 changes: 9 additions & 9 deletions pyglossary/plugins/csv_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@
import io

__all__ = [
"enable",
"lname",
"format",
"Reader",
"Writer",
"description",
"extensions",
"enable",
"extensionCreate",
"singleFile",
"extensions",
"format",
"kind",
"wiki",
"website",
"lname",
"optionsProp",
"Reader",
"Writer",
"singleFile",
"website",
"wiki",
]

enable = True
Expand Down
Loading

0 comments on commit 2f74885

Please sign in to comment.