Skip to content

Commit 1202cc7

Browse files
committed
Hotfix hyperglot-data attribute error
1 parent 3368f92 commit 1202cc7

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# A changelog for the lib/hyperglot language database and CLI tool (dd.mm.yyyy)
22

3+
## 0.7.1 (07.10.2024)
4+
- FIX: Fixed `hyperglot-data` error
5+
36
## 0.7.0 (07.10.2024)
47
- DATA: All language yaml documents now have their `contributors` listed, some have `reviewers` listed
58
- DATA: **Massive* improvement of language `sources` with proper source citations where possible

lib/hyperglot/__init__.py

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

9-
__version__ = "0.7.0"
9+
__version__ = "0.7.1"
1010

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

lib/hyperglot/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def export(output):
458458

459459
@click.command()
460460
@click.argument("search")
461-
def data(search):
461+
def data(search=""):
462462
"""
463463
Pass in a 3-letter iso code or language name (search term) to show
464464
Hyperglot data for it

lib/hyperglot/languages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def find_language(search):
3636
autonyms = [] if not aut else [aut.lower()]
3737
if "orthographies" in lang:
3838
for o in lang["orthographies"]:
39-
if "autonym" in o:
39+
if "autonym" in o and o["autonym"] is not None:
4040
autonyms.append(o["autonym"].lower())
4141

4242
if search == name or search in autonyms:

0 commit comments

Comments
 (0)