Skip to content

Commit

Permalink
🤖🧹 reformat Python files [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aarppe authored and actions-user committed Mar 6, 2024
1 parent 6c5b493 commit 1d71e39
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/CreeDictionary/API/schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
this file contains `TypedDict` classes that effectively serves as json schema for serialized objects
"""

from typing import List, Optional, Sequence, Tuple, Union

from typing_extensions import Literal, TypedDict
Expand Down
1 change: 1 addition & 0 deletions src/CreeDictionary/API/search/espt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
ESPT: English simple phrase translation
"""

import logging
import re
from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions src/CreeDictionary/API/search/espt_crk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Cree-specific data for English Inflected Phrase search
"""

from morphodict.analysis.tag_map import TagMap

# tags needed for FST generator
Expand Down
8 changes: 5 additions & 3 deletions src/CreeDictionary/API/search/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,11 @@ def get_lexical_info(
text=reduplication_string,
definitions=[
{
"text": "Strong reduplication: intermittent, repeatedly, iteratively; again and again; here and there"
if tag == "RdplS+"
else "Weak Reduplication: ongoing, continuing"
"text": (
"Strong reduplication: intermittent, repeatedly, iteratively; again and again; here and there"
if tag == "RdplS+"
else "Weak Reduplication: ongoing, continuing"
)
}
],
).serialize()
Expand Down
6 changes: 2 additions & 4 deletions src/CreeDictionary/API/search/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ class LinguisticTag(Protocol):
"""

@property
def value(self) -> FSTTag:
...
def value(self) -> FSTTag: ...

# TODO: linguistic feature

@property
def in_plain_english(self) -> str:
...
def in_plain_english(self) -> str: ...

def serialize(self) -> SerializedLinguisticTag:
return SerializedLinguisticTag(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Stub for data migration that used to add data to a table that no longer exists.
"""

from django.db import migrations


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Stub for data migration that used to add data to a table that no longer exists.
"""

from django.db import migrations


Expand Down
3 changes: 1 addition & 2 deletions src/CreeDictionary/CreeDictionary/paradigm/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,4 @@ class Transducer(Protocol):
the paradigm manager actually uses.
"""

def bulk_lookup(self, strings: Iterable[str]) -> dict[str, set[str]]:
...
def bulk_lookup(self, strings: Iterable[str]) -> dict[str, set[str]]: ...
1 change: 1 addition & 0 deletions src/CreeDictionary/CreeDictionary/paradigm/test_panes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for the paradigm pane module.
"""

import pytest
from more_itertools import first, ilen, last, one

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Template tags related to the Cree Dictionary specifically.
"""

from urllib.parse import quote
from weakref import WeakKeyDictionary

Expand Down
1 change: 0 additions & 1 deletion src/CreeDictionary/cvd/definition_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
2. Also refer unambiguously to a single wordform.
"""


import json
import logging
from typing import TypedDict, cast, Optional
Expand Down
1 change: 1 addition & 0 deletions src/CreeDictionary/morphodict/orthography.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Handling of the writing system of the language.
"""

import logging
from importlib import import_module
from typing import Callable, Set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Test Django template context processors.
"""


import pytest
from django.http import HttpRequest
from django.template import RequestContext, Template
Expand Down
1 change: 1 addition & 0 deletions src/CreeDictionary/utils/profiling.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""measure and report function execution time"""

import time
from functools import wraps
from typing import Any, Callable
Expand Down
1 change: 1 addition & 0 deletions src/CreeDictionary/utils/shared_res_dir.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Gives the path to the shared resources ("res") folder.
"""

from pathlib import Path

shared_res_dir: Path = Path(__file__).parent.parent / "res"
Expand Down
3 changes: 1 addition & 2 deletions src/CreeDictionary/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@


class HashableNamedTupleFieldValue(Protocol):
def __hash__(self):
...
def __hash__(self): ...


T = TypeVar("T")
Expand Down
1 change: 1 addition & 0 deletions src/crkeng/app/integration_tests/test_render_paradigm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test paradigm generation for the itwêwina (crkeng) dictionary.
"""

from more_itertools import first

from CreeDictionary.CreeDictionary.paradigm.generation import default_paradigm_manager
Expand Down
1 change: 1 addition & 0 deletions src/crkeng/app/preferences.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Preferences used in itwêwina, the Cree Intelligent Dictionary.
"""

from django.conf import settings

from morphodict.preference import register_preference, Preference
Expand Down
1 change: 1 addition & 0 deletions src/morphodict/preference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Allows for generic site-wide preferences stored in cookies.
"""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions src/morphodict/preference/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
path("preferences", include("morphodict.preference.urls")),
]
"""

from django.urls import path

from . import views
Expand Down
1 change: 0 additions & 1 deletion src/morphodict/runserver/mobile_run_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
foreground again.
"""


import socketserver
from threading import Condition, Lock
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions src/morphodict/site/base_dir_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from. The current workaround to pass that is to store the base dir here in a
variable that can only be set once.
"""

from pathlib import Path
from typing import Optional

Expand Down

0 comments on commit 1d71e39

Please sign in to comment.