Skip to content

Commit

Permalink
Remove unused imports (#415)(patch)
Browse files Browse the repository at this point in the history
### Fixed
- Removed unused package imports
  • Loading branch information
seallard authored Aug 10, 2023
1 parent 79bdb43 commit 40d27a8
Show file tree
Hide file tree
Showing 25 changed files with 22 additions and 45 deletions.
2 changes: 1 addition & 1 deletion cg_lims/EPPs/files/hamilton/normalization_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from cg_lims import options
from cg_lims.EPPs.files.hamilton.models import BarcodeFileRow
from cg_lims.exceptions import LimsError, MissingUDFsError
from cg_lims.files.manage_csv_files import build_csv, sort_csv, sort_csv_plate_and_tube
from cg_lims.files.manage_csv_files import build_csv, sort_csv_plate_and_tube
from cg_lims.get.artifacts import get_artifacts

LOG = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion cg_lims/EPPs/move/rerun_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List

import click
from genologics.entities import Artifact, Process, Stage
from genologics.entities import Artifact
from genologics.lims import Lims

from cg_lims import options
Expand Down
2 changes: 1 addition & 1 deletion cg_lims/EPPs/udf/calculate/calculate_water_volume_rna.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import click
from genologics.entities import Artifact

from cg_lims.exceptions import InvalidValueError, LimsError, MissingUDFsError
from cg_lims.exceptions import LimsError, MissingUDFsError
from cg_lims.get.artifacts import get_artifacts

LOG = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion cg_lims/EPPs/udf/copy/artifact_to_artifact.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Tuple, Iterator
from typing import List, Optional, Tuple
from genologics.entities import Artifact
from genologics.lims import Lims

Expand Down
3 changes: 0 additions & 3 deletions cg_lims/EPPs/udf/copy/artifact_to_sample.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env python
import logging
import sys

import click
from genologics.entities import Process
from genologics.lims import Lims

from cg_lims import options
from cg_lims.exceptions import LimsError, MissingUDFsError
Expand Down
3 changes: 0 additions & 3 deletions cg_lims/EPPs/udf/copy/original_well_to_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
import sys
import click

from typing import List
from genologics.entities import Process, Artifact
from genologics.lims import Lims

from cg_lims import options
from cg_lims.exceptions import LimsError, InvalidValueError
Expand Down
4 changes: 0 additions & 4 deletions cg_lims/EPPs/udf/copy/process_to_sample.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/usr/bin/env python
import logging
import sys

import click
from genologics.entities import Process
from genologics.lims import Lims

from cg_lims import options
from cg_lims.exceptions import LimsError, MissingUDFsError
from cg_lims.get.samples import get_process_samples


Expand Down
2 changes: 0 additions & 2 deletions cg_lims/EPPs/udf/copy/qc_to_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import sys

import click
from genologics.entities import Process
from genologics.lims import Lims

from cg_lims import options
from cg_lims.exceptions import LimsError, MissingUDFsError
Expand Down
4 changes: 2 additions & 2 deletions cg_lims/EPPs/udf/set/set_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"""
import logging
import sys
from typing import List, Optional
from typing import List

import click

import requests
from genologics.entities import Process

from cg_lims import options
from cg_lims.exceptions import LimsError, MissingUDFsError, AtlasResponseFailedError
from cg_lims.exceptions import LimsError, AtlasResponseFailedError

LOG = logging.getLogger(__name__)

Expand Down
4 changes: 1 addition & 3 deletions cg_lims/get/files.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import pathlib
from pathlib import Path
from typing import Optional

from genologics.config import BASEURI
from genologics.entities import Artifact, Process
from genologics.entities import Artifact
from genologics.lims import Lims

from cg_lims.exceptions import FileError


def get_log_content(lims: Lims, file_id: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion cg_lims/models/api/master_steps/pool_samples_twist_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pydantic.v1 import Field, validator

from cg_lims.models.api.master_steps.base_step import get_artifact_udf, get_artifact_name, BaseStep
from cg_lims.get.artifacts import get_latest_analyte, get_artifacts
from cg_lims.get.artifacts import get_latest_analyte


class PoolsamplesforhybridizationTWIST(BaseStep):
Expand Down
3 changes: 1 addition & 2 deletions cg_lims/objects.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Base cg_lims calss definitions
"""
from typing import Optional, List
from typing import Optional

from genologics.entities import Artifact, Sample, Process
from genologics.lims import Lims
Expand All @@ -16,7 +16,6 @@
get_latest_analyte,
)
import logging
from statistics import mean

LOG = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions cg_lims/put/queue.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
import pathlib
from typing import List

from genologics.config import BASEURI
from genologics.entities import Artifact, Process, Sample
from genologics.entities import Artifact
from genologics.lims import Lims

from cg_lims.get.ids import unique_list_of_ids
Expand Down
1 change: 0 additions & 1 deletion cg_lims/scripts/one_time_scripts/load_arnold_flowcells.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from genologics.lims import Lims
import requests
from requests import Response
import json

from cg_lims import options
from cg_lims.EPPs.arnold.flow_cell import build_flow_cell_document
Expand Down
1 change: 1 addition & 0 deletions cg_lims/set/udfs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging

from typing import List, Tuple

from genologics.entities import Artifact, Process
Expand Down
2 changes: 1 addition & 1 deletion tests/EPPs/arnold/test_arnold_novaseq_standard.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from genologics.entities import Process, Processtype
from genologics.entities import Process

from cg_lims.EPPs.arnold.sequencing import build_step_documents
from cg_lims.models.arnold.base_step import BaseStep
Expand Down
1 change: 0 additions & 1 deletion tests/EPPs/files/test_make_kapa_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pathlib import Path

from genologics.entities import Artifact
from genologics.entities import Sample

import pytest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import pytest
from genologics.entities import Artifact, Process
from genologics.entities import Process

from cg_lims.EPPs.udf.calculate.calculate_average_size_and_set_qc import calculate_average_size, set_average_and_qc
from cg_lims.exceptions import MissingUDFsError, MissingCgFieldError
from cg_lims.set.udfs import copy_artifact_to_artifact
from cg_lims.exceptions import MissingUDFsError
from tests.conftest import server


Expand Down
1 change: 0 additions & 1 deletion tests/EPPs/udf/calculate/test_maf_calculate_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest
from genologics.entities import Artifact
from genologics.lims import Lims
from pydantic.v1 import ValidationError

from cg_lims.EPPs.udf.calculate.maf_calculate_volume import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import pytest
from genologics.entities import Artifact, Process
from genologics.entities import Process

from cg_lims.EPPs.udf.copy.aggregate_qc_flags_and_copy_fields import get_copy_tasks, copy_udfs
from cg_lims.get.artifacts import get_artifacts
from cg_lims.EPPs.udf.copy.aggregate_qc_flags_and_copy_fields import get_copy_tasks
from cg_lims.exceptions import MissingUDFsError
from tests.conftest import server

Expand Down
4 changes: 2 additions & 2 deletions tests/EPPs/udf/copy/test_measurement_to_analyte.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
from genologics.entities import Artifact, Process
from genologics.entities import Process

from cg_lims.EPPs.udf.copy.measurement_to_analyte import copy_udfs_to_all_analytes
from cg_lims.get.artifacts import get_artifacts, get_latest_analyte
from cg_lims.get.artifacts import get_artifacts
from cg_lims.exceptions import MissingUDFsError
from tests.conftest import server

Expand Down
5 changes: 2 additions & 3 deletions tests/EPPs/udf/set/test_qc_to_sample.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import pytest
from genologics.entities import Artifact, Process
from genologics.entities import Process

from cg_lims.exceptions import MissingUDFsError, MissingCgFieldError
from cg_lims.exceptions import MissingUDFsError
from cg_lims.EPPs.udf.copy.qc_to_sample import artifacts_to_sample
from cg_lims.set.udfs import copy_artifact_to_artifact
from tests.conftest import server

from cg_lims.get.artifacts import get_artifacts
Expand Down
1 change: 0 additions & 1 deletion tests/EPPs/udf/set/test_set_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import responses
import requests
import logging


@pytest.fixture()
Expand Down
1 change: 0 additions & 1 deletion tests/commands/test_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pathlib import Path

import pytest
from click.testing import CliRunner

from cg_lims.commands.base import cli
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Dict, List, Optional
from typing import Dict, List
from unittest.mock import patch

from genologics.lims import Lims
from genologics.entities import Artifact, Process, Sample
from pathlib import Path
Expand All @@ -16,7 +17,6 @@


from limsmock.server import run_server
from pydantic.v1 import BaseModel, Field

from tests.fixtures.flowcell_document import FLOW_CELL_DOCUMENT

Expand Down

0 comments on commit 40d27a8

Please sign in to comment.