Skip to content

Commit

Permalink
Reformat and fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
frmdstryr committed Nov 6, 2024
1 parent 214c395 commit c938e29
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions atomdb/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Created on Jun 12, 2018
"""

import asyncio
import enum
import logging
Expand Down
1 change: 1 addition & 0 deletions atomdb/nosql.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Created on Jun 12, 2018
"""

import weakref

import bson
Expand Down
8 changes: 5 additions & 3 deletions atomdb/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Created on Aug 2, 2018
"""

import asyncio
import datetime
import enum
Expand All @@ -18,8 +19,9 @@
from typing import Callable as CallableType
from typing import ClassVar
from typing import Dict as DictType
from typing import Generic, Iterator, Optional, Sequence
from typing import Generic, Iterator
from typing import List as ListType
from typing import Optional, Sequence
from typing import Set as SetType
from typing import Tuple as TupleType
from typing import Type, TypeVar, Union, cast
Expand All @@ -29,7 +31,6 @@
from atom.api import (
Atom,
Bool,
Coerced,
ContainerList,
Dict,
ForwardInstance,
Expand Down Expand Up @@ -190,6 +191,7 @@ class RelatedList(atomclist):
"""A custom list which has methods to query a foreign key
one to many or many to many relation
"""

__slots__ = ()

async def load(self) -> list:
Expand Down Expand Up @@ -1152,7 +1154,7 @@ class SQLQuerySet(Atom, Generic[T]):
force_restore = Bool()

def clone(self, **kwargs) -> "SQLQuerySet[T]":
state = self.__getstate__()
state: DictType[str, Any] = self.__getstate__() # type: ignore
state.update(kwargs)
return self.__class__(**state)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
)

if "DATABASE_URL" not in os.environ:
os.environ[
"DATABASE_URL"
] = "postgres://postgres:postgres@127.0.0.1:5432/test_atomdb"
os.environ["DATABASE_URL"] = (
"postgres://postgres:postgres@127.0.0.1:5432/test_atomdb"
)

DATABASE_URL = os.environ["DATABASE_URL"]

Expand Down

0 comments on commit c938e29

Please sign in to comment.