Skip to content

Commit de89e46

Browse files
committed
Version bump, python 3.8 type hinting fixes
1 parent 986615e commit de89e46

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# A changelog for the lib/hyperglot language database and CLI tool (dd.mm.yyyy)
22

3-
## 0.6.4 (WIP)
3+
## 0.6.4 (20.06.2024)
44
- FIX: Fixed an issue where trying to log missing shaping glyphs would crash in `FontChecker`
55
- FIX: Improved mark shaping detection to interpret ccmp substitutions of base + mark as correctly shaping (thanks @arialcrime)
66
- TWEAK: Cleaned up `hyperglot.language.Language` class and added attribute properties for dict properties with computed defaults (as opposed to writing defaults for missing attributes) as well as more code annotation

lib/hyperglot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from enum import Enum
66
from typing import List
77

8-
__version__ = "0.6.3"
8+
__version__ = "0.6.4"
99

1010
DB = path.abspath(path.join(path.dirname(__file__), "data"))
1111
DB_EXTRA = path.abspath(path.join(path.dirname(__file__), "extra_data"))

lib/hyperglot/language.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
import logging
6-
from typing import List
6+
from typing import List, Union
77
from hyperglot import (
88
CHARACTER_ATTRIBUTES,
99
LanguageStatus,
@@ -92,7 +92,9 @@ def presentation(self):
9292
validity=self.validity,
9393
) # noqa
9494

95-
def get_orthography(self, script: str = None, status: str = None) -> dict | bool:
95+
def get_orthography(
96+
self, script: str = None, status: str = None
97+
) -> Union[dict, bool]:
9698
"""
9799
Get the most appropriate raw orthography attribute value, or one
98100
specifically matching the parameters. If there are multiple
@@ -193,7 +195,7 @@ def get_check_orthographies(self, check_all_orthographies: bool = False) -> List
193195

194196
return [Orthography(o) for o in orthographies]
195197

196-
def get_name(self, script: str = None, strict: bool = False) -> str | bool:
198+
def get_name(self, script: str = None, strict: bool = False) -> Union[str, bool]:
197199
if script is not None:
198200
ort = self.get_orthography(script)
199201
if "name" in ort:

0 commit comments

Comments
 (0)