Skip to content

Commit

Permalink
fixed type annotation syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
deeenes committed Jan 23, 2025
1 parent 9c47d31 commit a6fbb8e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions omnipath_server/loader/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# https://www.gnu.org/licenses/gpl-3.0.txt
#

from typing import TYPE_CHECKING
from collections.abc import Generator
import re
import bz2
Expand All @@ -24,6 +25,10 @@
from pypath_common import _misc
from sqlalchemy.orm import decl_api

if TYPE_CHECKING:

from sqlalchemy.sql.base import ReadOnlyColumnCollection

from .. import _log, _connection
from ..schema import _legacy as _schema

Expand Down Expand Up @@ -136,7 +141,7 @@ def _load_table(self, tbl: str):
compr_path,
schema,
self.con,
wipe = self.wipe
wipe = self.wipe,
).load()

_log(
Expand Down Expand Up @@ -200,7 +205,7 @@ def load(self) -> None:


@property
def columns(self) -> 'ReadOnlyColumnCollection':
def columns(self) -> ReadOnlyColumnCollection:

return self.table.__table__.columns

Expand Down Expand Up @@ -249,7 +254,7 @@ def _read(self) -> Generator[tuple, None, None]:
sep = getattr(
self.table,
'_array_sep',
{}
{},
).get(col, ';')

row[col] = row[col].split(sep) if row[col] else []
Expand Down

0 comments on commit a6fbb8e

Please sign in to comment.