Skip to content

Commit c75bfa9

Browse files
committed
pep8
1 parent 1f5f530 commit c75bfa9

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/viur/core/db/__init__.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
from .config import conf as config
33
from .errors import *
44
from .query import Query
5-
6-
from .transport import AllocateIDs, Count, Delete, Get, Put, RunInTransaction
5+
# new exports for 3.8
6+
from .transport import AllocateIDs, Count, Delete, Get, Put, RunInTransaction, allocate_ids, count, delete, get, \
7+
is_in_transaction, put, run_in_transaction
78
from .types import (DATASTORE_BASE_TYPES, Entity, KEY_SPECIAL_PROPERTY, Key, QueryDefinition, SortOrder,
89
currentDbAccessLog)
910
from .utils import (GetOrInsert, IsInTransaction, acquireTransactionSuccessMarker, encodeKey, endDataAccessLog,
1011
fixUnindexableProperties, keyHelper, normalizeKey, startDataAccessLog)
11-
# new exports for 3.8
12-
from .transport import allocate_ids, get, delete, put, is_in_transaction, run_in_transaction, count
13-
1412

1513
__all__ = [
1614
"KEY_SPECIAL_PROPERTY",

src/viur/core/db/cache.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33
import time
44
import typing as t
5+
56
from .config import conf
67
from .types import Entity, Key
78

src/viur/core/db/overrides.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from .types import Entity, Key
1+
from google.cloud.datastore.helpers import _get_meaning, _get_value_from_value_pb
22
from google.cloud.datastore_v1.types import entity as entity_pb2
3-
from google.cloud.datastore.helpers import _get_value_from_value_pb, _get_meaning
3+
4+
from .types import Entity, Key
45

56

67
def key_from_protobuf(pb): # !!! 100% Copy, only uses our Key Class

src/viur/core/db/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ def normalizeKey(key: t.Union[None, Key]) -> t.Union[None, Key]:
5858
def keyHelper(
5959
inKey: t.Union[Key, str, int],
6060
targetKind: str,
61-
additionalAllowedKinds: t.Union[t.List[str],
62-
t.Tuple[str]] = (),
61+
additionalAllowedKinds: t.Union[t.List[str], t.Tuple[str]] = (),
6362
adjust_kind: bool = False,
6463
) -> Key:
6564
if isinstance(inKey, Key):

0 commit comments

Comments
 (0)