Skip to content

Commit

Permalink
Simplify some imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumpe committed May 18, 2022
1 parent b4c125d commit 19936d3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
4 changes: 1 addition & 3 deletions gambit/cli/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from sqlalchemy.orm import sessionmaker

from gambit.kmers import KmerSpec
from gambit.db import ReferenceDatabase
from gambit.db.models import only_genomeset
from gambit.db.sqla import ReadOnlySession
from gambit.db import ReferenceDatabase, ReadOnlySession, only_genomeset
from gambit.sigs.base import ReferenceSignatures, load_signatures
from gambit.util.io import FilePath, read_lines
from gambit.util.misc import join_list_human
Expand Down
3 changes: 1 addition & 2 deletions gambit/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
from gambit import __version__ as GAMBIT_VERSION
from gambit.classify import classify, ClassifierResult, GenomeMatch, compare_classifier_results, \
compare_genome_matches
from gambit.db.models import reportable_taxon
from gambit.db import ReferenceDatabase, Taxon, ReferenceGenomeSet
from gambit.db import ReferenceDatabase, Taxon, ReferenceGenomeSet, reportable_taxon
from gambit.seq import SequenceFile
from gambit.sigs import KmerSignature, SignaturesMeta
from gambit.metric import jaccarddist_matrix
Expand Down
3 changes: 1 addition & 2 deletions tests/data/testdb_210818/generate-results.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from csv import DictReader

from gambit.seq import SequenceFile
from gambit.db import ReferenceDatabase
from gambit.db.models import reportable_taxon
from gambit.db import ReferenceDatabase, reportable_taxon
from gambit.query import QueryParams, query_parse
from gambit.results.archive import ResultsArchiveWriter
from gambit.util.misc import zip_strict
Expand Down
3 changes: 1 addition & 2 deletions tests/db/test_db_refdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from sqlalchemy.orm import sessionmaker

from gambit.db import refdb
from gambit.db.refdb import ReferenceDatabase
from gambit.db import Genome, ReferenceGenomeSet, AnnotatedGenome, Taxon
from gambit.db import Genome, ReferenceGenomeSet, AnnotatedGenome, Taxon, ReferenceDatabase


GENOME_ID_ATTRS = {attr: getattr(Genome, attr) for attr in Genome.ID_ATTRS}
Expand Down
2 changes: 1 addition & 1 deletion tests/db/test_db_sqla.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from sqlalchemy.orm import Session

from gambit.db.sqla import ReadOnlySession, file_sessionmaker
from gambit.db import ReadOnlySession, file_sessionmaker


def test_file_sessionmaker(testdb):
Expand Down
4 changes: 1 addition & 3 deletions tests/testdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

from gambit.db.sqla import ReadOnlySession
from gambit.seq import SequenceFile
from gambit.sigs import load_signatures
from gambit.db import ReferenceDatabase
from gambit.db.models import only_genomeset
from gambit.db import ReferenceDatabase, ReadOnlySession, only_genomeset
from gambit.results.archive import ResultsArchiveReader


Expand Down

0 comments on commit 19936d3

Please sign in to comment.