Skip to content

Commit

Permalink
Remove pylint pragma statements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed May 29, 2024
1 parent e3d9699 commit 4cbd28f
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/metldata/artifacts_rest/load_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async def process_new_or_changed_resources(
)


async def process_resource_upsert( # pylint: disable=too-many-locals
async def process_resource_upsert(
*,
artifact_info_dict: dict[str, ArtifactInfo],
artifact_name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""A transformation to add accessions to metadata."""

# shortcuts:
# pylint: disable=unused-import
from metldata.builtin_transformations.add_accessions.main import ( # noqa: F401
ACCESSION_ADDITION_TRANSFORMATION,
AccessionAdditionConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def transform(self, *, metadata: Json, annotation: SubmissionAnnotation) -> Json

def check_model_assumptions(
model: MetadataModel,
config: AccessionAdditionConfig, # pylint: disable=unused-argument
config: AccessionAdditionConfig,
) -> None:
"""Check the assumptions of the model.
Expand Down
1 change: 0 additions & 1 deletion src/metldata/builtin_transformations/aggregate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""Aggregate transformation for metadata."""

# shortcuts:
# pylint: disable=unused-import
from metldata.builtin_transformations.aggregate.config import ( # noqa: F401
AggregateConfig,
)
Expand Down
2 changes: 1 addition & 1 deletion src/metldata/builtin_transformations/aggregate/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def transform(self, *, metadata: Json, annotation: SubmissionAnnotation) -> Json

def check_model_assumptions(
model: MetadataModel,
config: AggregateConfig, # pylint: disable=unused-argument
config: AggregateConfig,
) -> None:
"""Check the assumptions of the model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from metldata.model_utils.anchors import AnchorPoint


# pylint: disable=unused-argument
def execute_aggregation(
*,
original_model: CachedMetadataModel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""A transformation to generate custom embeddings for classes of a metadata model."""

# shortcuts:
# pylint: disable=unused-import
from metldata.builtin_transformations.custom_embeddings.main import ( # noqa: F401
CUSTOM_EMBEDDING_TRANSFORMATION,
CustomEmbeddingConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class CustomEmbeddingConfig(BaseSettings):
),
)

# pylint: disable=no-self-argument
@field_validator("embedding_profiles")
def check_embedding_profiles_unique(
cls, # noqa: N805
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def transform(self, *, metadata: Json, annotation: SubmissionAnnotation) -> Json

def check_model_assumptions(
model: MetadataModel,
config: CustomEmbeddingConfig, # pylint: disable=unused-argument
config: CustomEmbeddingConfig,
) -> None:
"""Check the assumptions of the model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""A transformation that deletes slots from models and associated metadata."""

# shortcuts:
# pylint: disable=unused-import
from metldata.builtin_transformations.delete_slots.main import ( # noqa: F401
SLOT_DELETION_TRANSFORMATION,
SlotDeletionConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""A transformation to infer references based on existing ones in the metadata model."""

# shortcuts:
# pylint: disable=unused-import
from metldata.builtin_transformations.infer_references.main import ( # noqa: F401
REFERENCE_INFERENCE_TRANSFORMATION,
ReferenceInferenceConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def transform(self, *, metadata: Json, annotation: SubmissionAnnotation) -> Json

def check_model_assumptions(
model: MetadataModel,
config: ReferenceInferenceConfig, # pylint: disable=unused-argument
config: ReferenceInferenceConfig,
) -> None:
"""Check the assumptions of the model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""A transformation that merges multiple slots of a class into a single one."""

# shortcuts:
# pylint: disable=unused-import
from metldata.builtin_transformations.merge_slots.main import ( # noqa: F401
SLOT_MERGING_TRANSFORMATION,
SlotMergingConfig,
Expand Down
2 changes: 0 additions & 2 deletions src/metldata/builtin_transformations/normalize_model/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@
from metldata.transform.base import MetadataTransformer, TransformationDefinition


# pylint: disable=unused-argument
def check_model_assumptions(model: MetadataModel, config: NormalizationConfig):
"""Check that the classes and slots specified in the config exist in the model."""


# pylint: disable=unused-argument
def transform_model(model: MetadataModel, config: NormalizationConfig) -> MetadataModel:
"""Normalize the model."""
return normalize_model(model)
Expand Down
4 changes: 0 additions & 4 deletions src/metldata/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@

from hexkit.config import config_from_yaml

# pylint: disable=unused-import
from metldata.accession_registry.config import Config as AccessionRegistryConfig
from metldata.artifacts_rest.config import ArtifactsRestConfig

# pylint: disable=unused-import
from metldata.load.config import ArtifactLoaderAPIConfig
from metldata.submission_registry.config import Config as SubmissionRegistryConfig


# pylint: disable=too-many-ancestors
@config_from_yaml(prefix="metl_sub")
class SubmissionConfig(AccessionRegistryConfig, SubmissionRegistryConfig):
"""Config parameters and their defaults."""
Expand Down
2 changes: 1 addition & 1 deletion src/metldata/load/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from metldata.load.event_publisher import EventPubTranslatorConfig


class ArtifactLoaderAPIConfig( # pylint: disable=too-many-ancestors
class ArtifactLoaderAPIConfig(
ArtifactsRestConfig,
ApiConfigBase,
EventPubTranslatorConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/metldata/load/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def load_artifacts_using_dao(
)


async def _get_changed_resources( # pylint: disable=too-many-locals
async def _get_changed_resources(
artifact_resources: ArtifactResourceDict,
artifact_info_dict: dict[str, ArtifactInfo],
dao_collection: ArtifactDaoCollection,
Expand Down
1 change: 0 additions & 1 deletion src/metldata/model_utils/essentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def __eq__(self, other: object):

return self.as_dict() == other.as_dict()

# pylint: disable=too-many-nested-blocks,too-many-branches
def as_dict(self, essential: bool = True): # noqa: PLR0912, C901
"""Get a dictionary representation of the model. If essential set to True, the
dictionary will be cleaned of all fields that are not essential.
Expand Down
1 change: 0 additions & 1 deletion src/metldata/submission_registry/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from metldata.submission_registry.submission_store import SubmissionStoreConfig


# pylint: disable=too-many-ancestors
class Config(
SubmissionStoreConfig,
SubmissionRegistryConfig,
Expand Down
2 changes: 0 additions & 2 deletions src/metldata/transform/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from metldata.event_handling.models import SubmissionAnnotation

# shortcuts:
# pylint: disable=unused-import
from metldata.model_utils.assumptions import MetadataModelAssumptionError # noqa: F401
from metldata.model_utils.essentials import MetadataModel

Expand Down Expand Up @@ -162,7 +161,6 @@ class WorkflowDefinition(BaseModel):
),
)

# pylint: disable=no-self-argument
@field_validator("steps", mode="after")
def validate_step_references(
cls, # noqa: N805
Expand Down
1 change: 0 additions & 1 deletion src/metldata/transform/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from metldata.transform.source_event_subscriber import SourceEventSubscriberConfig


# pylint: disable=too-many-ancestors
class TransformationEventHandlingConfig(
FileSystemEventConfig, ArtifactEventPublisherConfig, SourceEventSubscriberConfig
):
Expand Down

0 comments on commit 4cbd28f

Please sign in to comment.