From 759c0629e658ee62633f8491e090978be5227516 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 13 Oct 2023 16:46:59 +0200 Subject: [PATCH] chore: enable ruf rule in ruff config Fixes: #439 --- .../controllers/fair_metric_controller.py | 4 +-- .../controllers/fair_object_controller.py | 6 ++-- fuji_server/controllers/harvest_controller.py | 10 +++---- .../evaluators/fair_evaluator_file_format.py | 2 +- .../fair_evaluator_minimal_metadata.py | 2 +- fuji_server/harvester/data_harvester.py | 2 +- fuji_server/harvester/metadata_harvester.py | 8 ++--- fuji_server/helper/catalogue_helper.py | 2 +- .../helper/catalogue_helper_datacite.py | 2 +- .../catalogue_helper_google_datasearch.py | 2 +- .../helper/catalogue_helper_mendeley_data.py | 2 +- fuji_server/helper/metadata_collector.py | 5 +++- .../helper/metadata_collector_dublincore.py | 6 ++-- fuji_server/helper/metadata_collector_rdf.py | 8 ++--- .../helper/metadata_provider_rss_atom.py | 2 +- fuji_server/helper/preprocessor.py | 5 ++-- fuji_server/helper/request_helper.py | 6 ++-- .../models/any_of_fair_results_items.py | 2 +- fuji_server/models/body.py | 20 ++++++------- .../models/community_endorsed_standard.py | 30 +++++++++---------- .../community_endorsed_standard_output.py | 2 +- ...ommunity_endorsed_standard_output_inner.py | 12 ++++---- fuji_server/models/core_metadata.py | 30 +++++++++---------- fuji_server/models/core_metadata_output.py | 10 +++---- fuji_server/models/data_access_level.py | 30 +++++++++---------- fuji_server/models/data_access_output.py | 4 +-- fuji_server/models/data_content_metadata.py | 20 ++++++------- .../models/data_content_metadata_output.py | 8 +++-- .../data_content_metadata_output_inner.py | 4 +-- fuji_server/models/data_file_format.py | 30 +++++++++---------- fuji_server/models/data_file_format_output.py | 4 +-- .../models/data_file_format_output_inner.py | 10 +++---- fuji_server/models/data_provenance.py | 30 +++++++++---------- fuji_server/models/data_provenance_output.py | 4 +-- .../models/data_provenance_output_inner.py | 2 +- fuji_server/models/debug.py | 2 +- fuji_server/models/fair_result_common.py | 24 +++++++-------- .../models/fair_result_common_score.py | 2 +- .../fair_result_evaluation_criterium.py | 12 ++++---- ...esult_evaluation_criterium_requirements.py | 12 ++++---- fuji_server/models/fair_results.py | 28 ++++++++--------- fuji_server/models/formal_metadata.py | 30 +++++++++---------- fuji_server/models/formal_metadata_output.py | 4 +-- .../models/formal_metadata_output_inner.py | 6 ++-- fuji_server/models/harvest.py | 8 ++--- fuji_server/models/harvest_results.py | 4 +-- .../models/harvest_results_metadata.py | 14 ++++----- fuji_server/models/identifier_included.py | 30 +++++++++---------- .../models/identifier_included_output.py | 4 +-- .../identifier_included_output_inner.py | 2 +- fuji_server/models/license.py | 30 +++++++++---------- fuji_server/models/license_output.py | 4 +-- fuji_server/models/license_output_inner.py | 2 +- fuji_server/models/metadata_preserved.py | 30 +++++++++---------- .../models/metadata_preserved_output.py | 8 ++--- fuji_server/models/metric.py | 22 +++++++------- fuji_server/models/metrics.py | 4 +-- .../models/output_core_metadata_found.py | 2 +- .../models/output_search_mechanisms.py | 4 +-- fuji_server/models/persistence.py | 30 +++++++++---------- fuji_server/models/persistence_output.py | 4 +-- .../models/persistence_output_inner.py | 8 +++-- fuji_server/models/related_resource.py | 30 +++++++++---------- fuji_server/models/related_resource_output.py | 4 +-- .../models/related_resource_output_inner.py | 2 +- fuji_server/models/searchable.py | 30 +++++++++---------- fuji_server/models/searchable_output.py | 4 +-- fuji_server/models/semantic_vocabulary.py | 30 +++++++++---------- .../models/semantic_vocabulary_output.py | 4 +-- .../semantic_vocabulary_output_inner.py | 2 +- .../models/standardised_protocol_data.py | 30 +++++++++---------- .../standardised_protocol_data_output.py | 2 +- .../models/standardised_protocol_metadata.py | 29 +++++++++--------- .../standardised_protocol_metadata_output.py | 2 +- fuji_server/models/uniqueness.py | 30 +++++++++---------- fuji_server/models/uniqueness_output.py | 2 +- pyproject.toml | 10 +++++-- 77 files changed, 437 insertions(+), 430 deletions(-) diff --git a/fuji_server/controllers/fair_metric_controller.py b/fuji_server/controllers/fair_metric_controller.py index d4161e95..83514360 100644 --- a/fuji_server/controllers/fair_metric_controller.py +++ b/fuji_server/controllers/fair_metric_controller.py @@ -27,7 +27,7 @@ from fuji_server.helper.metric_helper import MetricHelper -def get_metrics(version): # noqa: E501 +def get_metrics(version): """Return all metrics and their definitions. :rtype: Metrics """ @@ -40,7 +40,7 @@ def get_metrics(version): # noqa: E501 return response, 404 -def get_metric(version, metric): # noqa: E501 +def get_metric(version, metric): """Return all metrics and their definitions. :rtype: Metrics """ diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index 456b05ed..6bd83370 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -29,11 +29,11 @@ from fuji_server.controllers.fair_check import FAIRCheck from fuji_server.helper.identifier_helper import IdentifierHelper from fuji_server.helper.preprocessor import Preprocessor -from fuji_server.models.body import Body # noqa: E501 -from fuji_server.models.fair_results import FAIRResults # noqa: E501 +from fuji_server.models.body import Body +from fuji_server.models.fair_results import FAIRResults -def assess_by_id(body): # noqa: E501 +def assess_by_id(body): """assess_by_id Evaluate FAIRness of a data object based on its identifier # noqa: E501 diff --git a/fuji_server/controllers/harvest_controller.py b/fuji_server/controllers/harvest_controller.py index 169a87d0..fab5a040 100644 --- a/fuji_server/controllers/harvest_controller.py +++ b/fuji_server/controllers/harvest_controller.py @@ -26,12 +26,12 @@ import connexion from fuji_server.controllers.fair_check import FAIRCheck -from fuji_server.models.harvest import Harvest # noqa: E501 -from fuji_server.models.harvest_results import HarvestResults # noqa: E501 -from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata # noqa: E501 +from fuji_server.models.harvest import Harvest +from fuji_server.models.harvest_results import HarvestResults +from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata -def harvest_by_id(body=None): # noqa: E501 +def harvest_by_id(body=None): """harvest_by_id Harvest metadata of a data object based on its identifier # noqa: E501 @@ -42,7 +42,7 @@ def harvest_by_id(body=None): # noqa: E501 :rtype: HarvestResults """ if connexion.request.is_json: - body = Harvest.from_dict(connexion.request.get_json()) # noqa: E501 + body = Harvest.from_dict(connexion.request.get_json()) identifier = body.object_identifier auth_token = body.auth_token auth_token_type = body.auth_token_type diff --git a/fuji_server/evaluators/fair_evaluator_file_format.py b/fuji_server/evaluators/fair_evaluator_file_format.py index 48f5f986..a2ce6d9f 100644 --- a/fuji_server/evaluators/fair_evaluator_file_format.py +++ b/fuji_server/evaluators/fair_evaluator_file_format.py @@ -91,7 +91,7 @@ def setFileFormatDict(self): guessed_mime_type = mimetypes.guess_type(data_file.get("url")) mime_type = guessed_mime_type[ 0 - ] # the return value is a tuple (type, encoding) where type is None if the type can’t be guessed + ] # the return value is a tuple (type, encoding) where type is None if the type can`t be guessed if mime_type: self.logger.info(f"FsF-R1.3-02D : Mime type guess return value -: {mime_type}") else: diff --git a/fuji_server/evaluators/fair_evaluator_minimal_metadata.py b/fuji_server/evaluators/fair_evaluator_minimal_metadata.py index f2488707..11b2be7a 100644 --- a/fuji_server/evaluators/fair_evaluator_minimal_metadata.py +++ b/fuji_server/evaluators/fair_evaluator_minimal_metadata.py @@ -133,7 +133,7 @@ def testCoreDescriptiveMetadataAvailable(self): core_missing = list(set(self.required_metadata_properties) - set(self.metadata_found)) self.logger.warning( self.metric_identifier - + f" : Not all required core descriptive metadata elements exist, missing -: {str(core_missing)}" + + f" : Not all required core descriptive metadata elements exist, missing -: {core_missing!s}" ) return test_status diff --git a/fuji_server/harvester/data_harvester.py b/fuji_server/harvester/data_harvester.py index 385bd1a4..b2a384d6 100644 --- a/fuji_server/harvester/data_harvester.py +++ b/fuji_server/harvester/data_harvester.py @@ -109,7 +109,7 @@ def retrieve_all_data(self, scan_content=True): timeout = 10 if len(ft) > self.max_number_per_mime: self.logger.warning( - f"FsF-F3-01M : Found more than -: {str(self.max_number_per_mime)} data links (out of {str(len(ft))}) of type {fmime} will only take {str(self.max_number_per_mime)}" + f"FsF-F3-01M : Found more than -: {self.max_number_per_mime!s} data links (out of {len(ft)!s}) of type {fmime} will only take {self.max_number_per_mime!s}" ) files_to_check = ft[: self.max_number_per_mime] # add the fifth one for compatibility reasons < f-uji 3.0.1, when we took the last of list of length FILES_LIMIT diff --git a/fuji_server/harvester/metadata_harvester.py b/fuji_server/harvester/metadata_harvester.py index 0afc81bd..5da6b2c6 100644 --- a/fuji_server/harvester/metadata_harvester.py +++ b/fuji_server/harvester/metadata_harvester.py @@ -1029,7 +1029,7 @@ def retrieve_metadata_external_rdf_negotiated(self, target_url_list=[]): if rdf_dict: self.logger.log( self.LOG_SUCCESS, - f"FsF-F2-01M : Found Linked Data metadata -: {str(rdf_dict.keys())}", + f"FsF-F2-01M : Found Linked Data metadata -: {rdf_dict.keys()!s}", ) # self.metadata_sources.append((source_rdf, 'negotiated')) self.add_metadata_source(source_rdf) @@ -1177,7 +1177,7 @@ def retrieve_metadata_external_oai_ore(self): source_ore, ore_dict = ore_atom_collector.parse_metadata() ore_dict = self.exclude_null(ore_dict) if ore_dict: - self.logger.log(self.LOG_SUCCESS, f"FsF-F2-01M : Found OAI ORE metadata -: {str(ore_dict.keys())}") + self.logger.log(self.LOG_SUCCESS, f"FsF-F2-01M : Found OAI ORE metadata -: {ore_dict.keys()!s}") self.add_metadata_source(source_ore) self.merge_metadata( ore_dict, @@ -1207,7 +1207,7 @@ def retrieve_metadata_external_datacite(self): # self.metadata_sources.append((source_dcitejsn, 'negotiated')) self.add_metadata_source(source_dcitejsn) self.logger.log( - self.LOG_SUCCESS, f"FsF-F2-01M : Found Datacite metadata -: {str(dcitejsn_dict.keys())}" + self.LOG_SUCCESS, f"FsF-F2-01M : Found Datacite metadata -: {dcitejsn_dict.keys()!s}" ) self.namespace_uri.extend(dcite_collector.getNamespaces()) @@ -1311,7 +1311,7 @@ def retrieve_metadata_external_linked_metadata(self): if rdf_dict: self.logger.log( self.LOG_SUCCESS, - f"FsF-F2-01M : Found Linked Data (RDF) metadata -: {str(rdf_dict.keys())}", + f"FsF-F2-01M : Found Linked Data (RDF) metadata -: {rdf_dict.keys()!s}", ) # self.metadata_sources.append((source_rdf, metadata_link['source'])) self.add_metadata_source(source_rdf) diff --git a/fuji_server/helper/catalogue_helper.py b/fuji_server/helper/catalogue_helper.py index b1ef4fe3..e8a2d8d8 100644 --- a/fuji_server/helper/catalogue_helper.py +++ b/fuji_server/helper/catalogue_helper.py @@ -28,7 +28,7 @@ class Sources(enum.Enum): GOOGLE_DATASET = "Google Dataset Search" MENDELEY_DATA = "Mendeley Data" - def __init__(self, logger: logging.Logger = None): + def __init__(self, logger: logging.Logger | None = None): """ Parameters ---------- diff --git a/fuji_server/helper/catalogue_helper_datacite.py b/fuji_server/helper/catalogue_helper_datacite.py index 05a51072..14d8556b 100644 --- a/fuji_server/helper/catalogue_helper_datacite.py +++ b/fuji_server/helper/catalogue_helper_datacite.py @@ -23,7 +23,7 @@ class MetaDataCatalogueDataCite(MetaDataCatalogue): islisted = False apiURI = "https://api.datacite.org/dois" - def __init__(self, logger: logging.Logger = None): + def __init__(self, logger: logging.Logger | None = None): """ Parameters ---------- diff --git a/fuji_server/helper/catalogue_helper_google_datasearch.py b/fuji_server/helper/catalogue_helper_google_datasearch.py index 3a38ea4b..39e86d5c 100644 --- a/fuji_server/helper/catalogue_helper_google_datasearch.py +++ b/fuji_server/helper/catalogue_helper_google_datasearch.py @@ -32,7 +32,7 @@ class MetaDataCatalogueGoogleDataSearch(MetaDataCatalogue): """ # apiURI = 'https://api.datacite.org/dois' - def __init__(self, logger: logging.Logger = None, object_type=None): + def __init__(self, logger: logging.Logger | None = None, object_type=None): self.islisted = False self.logger = logger diff --git a/fuji_server/helper/catalogue_helper_mendeley_data.py b/fuji_server/helper/catalogue_helper_mendeley_data.py index 17138c19..146f6d28 100644 --- a/fuji_server/helper/catalogue_helper_mendeley_data.py +++ b/fuji_server/helper/catalogue_helper_mendeley_data.py @@ -23,7 +23,7 @@ class MetaDataCatalogueMendeleyData(MetaDataCatalogue): islisted = False apiURI = "https://api.datasearch.elsevier.com/api/v2/search?query=" - def __init__(self, logger: logging.Logger = None): + def __init__(self, logger: logging.Logger | None = None): self.logger = logger self.source = self.getEnumSourceNames().MENDELEY_DATA.value diff --git a/fuji_server/helper/metadata_collector.py b/fuji_server/helper/metadata_collector.py index ed72281b..f066f6fd 100644 --- a/fuji_server/helper/metadata_collector.py +++ b/fuji_server/helper/metadata_collector.py @@ -228,7 +228,10 @@ class MetaDataCollector: metadata_mapping: Mapper | None def __init__( - self, sourcemetadata: dict = None, mapping: metadata_mapper.Mapper = None, logger: logging.Logger = None + self, + sourcemetadata: dict | None = None, + mapping: metadata_mapper.Mapper = None, + logger: logging.Logger | None = None, ): """ Parameters diff --git a/fuji_server/helper/metadata_collector_dublincore.py b/fuji_server/helper/metadata_collector_dublincore.py index 86418b85..28cab43a 100644 --- a/fuji_server/helper/metadata_collector_dublincore.py +++ b/fuji_server/helper/metadata_collector_dublincore.py @@ -150,13 +150,11 @@ def parse_metadata(self): if k.lower() in dcterms: # self.logger.info('FsF-F2-01M: DublinCore metadata element, %s = %s , ' % (k, v)) try: - elem = [ + elem = next( key for (key, value) in Mapper.DC_MAPPING.value.items() if k.lower() in str(value).lower() - ][ - 0 - ] # fuji ref fields + ) # fuji ref fields except Exception: # nothing found so just continue pass diff --git a/fuji_server/helper/metadata_collector_rdf.py b/fuji_server/helper/metadata_collector_rdf.py index 09a134d2..53d5eebb 100644 --- a/fuji_server/helper/metadata_collector_rdf.py +++ b/fuji_server/helper/metadata_collector_rdf.py @@ -419,9 +419,7 @@ def parse_metadata(self): if not RDFparsed: continue else: - self.logger.warning( - f"FsF-F2-01M : Failed to parse RDF -: {self.target_url} {str(e)}" - ) + self.logger.warning(f"FsF-F2-01M : Failed to parse RDF -: {self.target_url} {e!s}") else: self.logger.info( "FsF-F2-01M : Seems to be HTML not RDF, therefore skipped parsing RDF from -: %s" @@ -943,8 +941,8 @@ def get_schemaorg_metadata_from_graph(self, graph): if "Dataset" in cand_creative_work: creative_work = cand_creative_work["Dataset"] else: - creative_work = cand_creative_work[list(cand_creative_work)[0]] - creative_work_type = list(cand_creative_work)[0] + creative_work = cand_creative_work[next(iter(cand_creative_work))] + creative_work_type = next(iter(cand_creative_work)) except Exception as e: self.logger.info("FsF-F2-01M : Schema.org RDF graph parsing failed -: " + str(e)) diff --git a/fuji_server/helper/metadata_provider_rss_atom.py b/fuji_server/helper/metadata_provider_rss_atom.py index 339dbf31..f9dab05a 100644 --- a/fuji_server/helper/metadata_provider_rss_atom.py +++ b/fuji_server/helper/metadata_provider_rss_atom.py @@ -77,7 +77,7 @@ def getMetadataStandards(self): except Exception as e: print("RSS Error ", e) self.logger.info( - f"{self.metric_id} : Could not parse response retrieved from RSS/Atom Feed endpoint -: {str(e)}" + f"{self.metric_id} : Could not parse response retrieved from RSS/Atom Feed endpoint -: {e!s}" ) return schemas diff --git a/fuji_server/helper/preprocessor.py b/fuji_server/helper/preprocessor.py index a01e6734..93f7c3a0 100644 --- a/fuji_server/helper/preprocessor.py +++ b/fuji_server/helper/preprocessor.py @@ -24,7 +24,6 @@ import mimetypes import os import time -from typing import Any from urllib.parse import urlparse import requests @@ -61,7 +60,7 @@ class Preprocessor: long_term_file_formats = {} open_file_formats = {} access_rights = {} - re3repositories: dict[Any, Any] = {} + re3repositories: dict[str, str] = {} linked_vocabs = {} linked_vocab_index = {} default_namespaces = [] @@ -487,7 +486,7 @@ def retrieve_linkedvocabs(cls, lov_api, lodcloud_api, isDebugMode): broken = [] cls.logger.info(f"{len(raw_lov)} vocabs specified at {lov_api}") for lov in raw_lov: - title = [i.get("value") for i in lov.get("titles") if i.get("lang") == "en"][0] + title = next(i.get("value") for i in lov.get("titles") if i.get("lang") == "en") uri = lov.get("uri") nsp = lov.get("nsp") if uri and nsp: diff --git a/fuji_server/helper/request_helper.py b/fuji_server/helper/request_helper.py index a5041513..3d7ecd9d 100644 --- a/fuji_server/helper/request_helper.py +++ b/fuji_server/helper/request_helper.py @@ -502,7 +502,7 @@ def content_negotiate(self, metric_id="", ignore_html=True): self.logger.warning(f"{metric_id} : Content-type is NOT SPECIFIED") else: self.logger.warning( - f"{metric_id} : NO successful response received, status code -: {str(status_code)}" + f"{metric_id} : NO successful response received, status code -: {status_code!s}" ) tp_response.close() else: @@ -512,12 +512,12 @@ def content_negotiate(self, metric_id="", ignore_html=True): # except requests.exceptions.SSLError as e: except urllib.error.HTTPError as e: self.logger.warning( - f"{metric_id} : Content negotiation failed -: accept={self.accept_type}, status={str(e.code)} " + f"{metric_id} : Content negotiation failed -: accept={self.accept_type}, status={e.code!s} " ) self.response_status = int(e.code) except urllib.error.URLError as e: self.logger.warning(f"{metric_id} : RequestException -: {e.reason} : {self.request_url}") except Exception as e: print(e, "Request helper") - self.logger.warning(f"{metric_id} : Request Failed -: {str(e)} : {self.request_url}") + self.logger.warning(f"{metric_id} : Request Failed -: {e!s} : {self.request_url}") return format, self.parse_response diff --git a/fuji_server/models/any_of_fair_results_items.py b/fuji_server/models/any_of_fair_results_items.py index d4047f72..de3416c7 100644 --- a/fuji_server/models/any_of_fair_results_items.py +++ b/fuji_server/models/any_of_fair_results_items.py @@ -8,7 +8,7 @@ class AnyOfFAIRResultsResultsItems(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """AnyOfFAIRResultsResultsItems - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/body.py b/fuji_server/models/body.py index b40e9929..2bdb1321 100644 --- a/fuji_server/models/body.py +++ b/fuji_server/models/body.py @@ -10,16 +10,16 @@ class Body(Model): def __init__( self, - object_identifier: str = None, + object_identifier: str | None = None, test_debug: bool = False, - metadata_service_endpoint: str = None, - metadata_service_type: str = None, - use_datacite: bool = None, - metric_version: str = None, - auth_token: str = None, - auth_token_type: str = None, - oaipmh_endpoint: str = None, - ): # noqa: E501 + metadata_service_endpoint: str | None = None, + metadata_service_type: str | None = None, + use_datacite: bool | None = None, + metric_version: str | None = None, + auth_token: str | None = None, + auth_token_type: str | None = None, + oaipmh_endpoint: str | None = None, + ): """Body - a model defined in Swagger :param object_identifier: The object_identifier of this Body. # noqa: E501 @@ -106,7 +106,7 @@ def object_identifier(self, object_identifier: str): :type object_identifier: str """ if object_identifier is None: - raise ValueError("Invalid value for `object_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `object_identifier`, must not be `None`") self._object_identifier = object_identifier diff --git a/fuji_server/models/community_endorsed_standard.py b/fuji_server/models/community_endorsed_standard.py index bc36f20d..eb700955 100644 --- a/fuji_server/models/community_endorsed_standard.py +++ b/fuji_server/models/community_endorsed_standard.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput # noqa: F401,E501 -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium class CommunityEndorsedStandard(Model): @@ -15,16 +15,16 @@ class CommunityEndorsedStandard(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: CommunityEndorsedStandardOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """CommunityEndorsedStandard - a model defined in Swagger :param id: The id of this CommunityEndorsedStandard. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this CommunityEndorsedStandard. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/community_endorsed_standard_output.py b/fuji_server/models/community_endorsed_standard_output.py index 3d5d5b9a..1d4b8d7d 100644 --- a/fuji_server/models/community_endorsed_standard_output.py +++ b/fuji_server/models/community_endorsed_standard_output.py @@ -8,7 +8,7 @@ class CommunityEndorsedStandardOutput(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """CommunityEndorsedStandardOutput - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/community_endorsed_standard_output_inner.py b/fuji_server/models/community_endorsed_standard_output_inner.py index 63107f4e..0f2ca895 100644 --- a/fuji_server/models/community_endorsed_standard_output_inner.py +++ b/fuji_server/models/community_endorsed_standard_output_inner.py @@ -10,12 +10,12 @@ class CommunityEndorsedStandardOutputInner(Model): def __init__( self, - metadata_standard: str = None, - url: str = None, - subject_areas: list[str] = None, - type: str = None, - source: str = None, - ): # noqa: E501 + metadata_standard: str | None = None, + url: str | None = None, + subject_areas: list[str] | None = None, + type: str | None = None, + source: str | None = None, + ): """CommunityEndorsedStandardOutputInner - a model defined in Swagger :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 diff --git a/fuji_server/models/core_metadata.py b/fuji_server/models/core_metadata.py index 6e476108..b9a42dfb 100644 --- a/fuji_server/models/core_metadata.py +++ b/fuji_server/models/core_metadata.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.core_metadata_output import CoreMetadataOutput # noqa: F401,E501 -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.core_metadata_output import CoreMetadataOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium class CoreMetadata(Model): @@ -15,16 +15,16 @@ class CoreMetadata(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: int = 0, output: CoreMetadataOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """CoreMetadata - a model defined in Swagger :param id: The id of this CoreMetadata. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this CoreMetadata. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/core_metadata_output.py b/fuji_server/models/core_metadata_output.py index 2dd92185..01954a5b 100644 --- a/fuji_server/models/core_metadata_output.py +++ b/fuji_server/models/core_metadata_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.output_core_metadata_found import OutputCoreMetadataFound # noqa: F401,E501 +from fuji_server.models.output_core_metadata_found import OutputCoreMetadataFound class CoreMetadataOutput(Model): @@ -11,10 +11,10 @@ class CoreMetadataOutput(Model): def __init__( self, - core_metadata_status: str = None, + core_metadata_status: str | None = None, core_metadata_found: OutputCoreMetadataFound = None, - core_metadata_source: list[str] = None, - ): # noqa: E501 + core_metadata_source: list[str] | None = None, + ): """CoreMetadataOutput - a model defined in Swagger :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 @@ -68,7 +68,7 @@ def core_metadata_status(self, core_metadata_status: str): :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. :type core_metadata_status: str """ - allowed_values = ["insufficent metadata", "partial metadata", "all metadata"] # noqa: E501 + allowed_values = ["insufficent metadata", "partial metadata", "all metadata"] if core_metadata_status not in allowed_values: raise ValueError( f"Invalid value for `core_metadata_status` ({core_metadata_status}), must be one of {allowed_values}" diff --git a/fuji_server/models/data_access_level.py b/fuji_server/models/data_access_level.py index a95ac9b7..b2f94fd4 100644 --- a/fuji_server/models/data_access_level.py +++ b/fuji_server/models/data_access_level.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.data_access_output import DataAccessOutput # noqa: F401,E501 -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.data_access_output import DataAccessOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium class DataAccessLevel(Model): @@ -15,16 +15,16 @@ class DataAccessLevel(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: DataAccessOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """DataAccessLevel - a model defined in Swagger :param id: The id of this DataAccessLevel. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this DataAccessLevel. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/data_access_output.py b/fuji_server/models/data_access_output.py index 441830ee..6f133b4e 100644 --- a/fuji_server/models/data_access_output.py +++ b/fuji_server/models/data_access_output.py @@ -8,7 +8,7 @@ class DataAccessOutput(Model): Do not edit the class manually. """ - def __init__(self, access_level: str = None, access_details: object = None): # noqa: E501 + def __init__(self, access_level: str | None = None, access_details: object = None): """DataAccessOutput - a model defined in Swagger :param access_level: The access_level of this DataAccessOutput. # noqa: E501 @@ -51,7 +51,7 @@ def access_level(self, access_level: str): :param access_level: The access_level of this DataAccessOutput. :type access_level: str """ - allowed_values = ["public", "embargoed", "restricted", "closed", "metadataonly"] # noqa: E501 + allowed_values = ["public", "embargoed", "restricted", "closed", "metadataonly"] if access_level not in allowed_values: raise ValueError(f"Invalid value for `access_level` ({access_level}), must be one of {allowed_values}") diff --git a/fuji_server/models/data_content_metadata.py b/fuji_server/models/data_content_metadata.py index 0bdca1b5..64321e34 100644 --- a/fuji_server/models/data_content_metadata.py +++ b/fuji_server/models/data_content_metadata.py @@ -14,16 +14,16 @@ class DataContentMetadata(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: DataContentMetadataOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """DataContentMetadata - a model defined in Swagger :param id: The id of this DataContentMetadata. # noqa: E501 @@ -108,7 +108,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -131,7 +131,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -154,7 +154,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -197,7 +197,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this DataContentMetadata. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -222,7 +222,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/data_content_metadata_output.py b/fuji_server/models/data_content_metadata_output.py index 51b010ac..c49e1c87 100644 --- a/fuji_server/models/data_content_metadata_output.py +++ b/fuji_server/models/data_content_metadata_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.data_content_metadata_output_inner import DataContentMetadataOutputInner # noqa: F401,E501 +from fuji_server.models.data_content_metadata_output_inner import DataContentMetadataOutputInner class DataContentMetadataOutput(Model): @@ -10,8 +10,10 @@ class DataContentMetadataOutput(Model): """ def __init__( - self, object_type: str = None, data_content_descriptor: list[DataContentMetadataOutputInner] = None - ): # noqa: E501 + self, + object_type: str | None = None, + data_content_descriptor: list[DataContentMetadataOutputInner] | None = None, + ): """DataContentMetadataOutput - a model defined in Swagger :param object_type: The object_type of this DataContentMetadataOutput. # noqa: E501 diff --git a/fuji_server/models/data_content_metadata_output_inner.py b/fuji_server/models/data_content_metadata_output_inner.py index 4e59312c..7ad51ec4 100644 --- a/fuji_server/models/data_content_metadata_output_inner.py +++ b/fuji_server/models/data_content_metadata_output_inner.py @@ -9,8 +9,8 @@ class DataContentMetadataOutputInner(Model): """ def __init__( - self, descriptor: str = None, descriptor_value: str = None, matches_content: bool = False - ): # noqa: E501 + self, descriptor: str | None = None, descriptor_value: str | None = None, matches_content: bool = False + ): """DataContentMetadataOutputInner - a model defined in Swagger :param descriptor: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 diff --git a/fuji_server/models/data_file_format.py b/fuji_server/models/data_file_format.py index 3e989a4c..63fca363 100644 --- a/fuji_server/models/data_file_format.py +++ b/fuji_server/models/data_file_format.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.data_file_format_output import DataFileFormatOutput # noqa: F401,E501 -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.data_file_format_output import DataFileFormatOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium class DataFileFormat(Model): @@ -15,16 +15,16 @@ class DataFileFormat(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: DataFileFormatOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """DataFileFormat - a model defined in Swagger :param id: The id of this DataFileFormat. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this DataFileFormat. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/data_file_format_output.py b/fuji_server/models/data_file_format_output.py index 0a27111c..bf6010b8 100644 --- a/fuji_server/models/data_file_format_output.py +++ b/fuji_server/models/data_file_format_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.data_file_format_output_inner import DataFileFormatOutputInner # noqa: F401,E501 +from fuji_server.models.data_file_format_output_inner import DataFileFormatOutputInner # noqa: F401 class DataFileFormatOutput(Model): @@ -9,7 +9,7 @@ class DataFileFormatOutput(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """DataFileFormatOutput - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/data_file_format_output_inner.py b/fuji_server/models/data_file_format_output_inner.py index c8344e26..7a714917 100644 --- a/fuji_server/models/data_file_format_output_inner.py +++ b/fuji_server/models/data_file_format_output_inner.py @@ -10,12 +10,12 @@ class DataFileFormatOutputInner(Model): def __init__( self, - file_uri: str = None, - mime_type: str = None, + file_uri: str | None = None, + mime_type: str | None = None, is_preferred_format: bool = False, - preference_reason: list[str] = None, - subject_areas: list[str] = None, - ): # noqa: E501 + preference_reason: list[str] | None = None, + subject_areas: list[str] | None = None, + ): """DataFileFormatOutputInner - a model defined in Swagger :param file_uri: The file_uri of this DataFileFormatOutputInner. # noqa: E501 diff --git a/fuji_server/models/data_provenance.py b/fuji_server/models/data_provenance.py index a208002c..2919542e 100644 --- a/fuji_server/models/data_provenance.py +++ b/fuji_server/models/data_provenance.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.data_provenance_output import DataProvenanceOutput # noqa: F401,E501 -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.data_provenance_output import DataProvenanceOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium class DataProvenance(Model): @@ -15,16 +15,16 @@ class DataProvenance(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: DataProvenanceOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """DataProvenance - a model defined in Swagger :param id: The id of this DataProvenance. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this DataProvenance. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/data_provenance_output.py b/fuji_server/models/data_provenance_output.py index 3b4e32f5..e4715d99 100644 --- a/fuji_server/models/data_provenance_output.py +++ b/fuji_server/models/data_provenance_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.data_provenance_output_inner import DataProvenanceOutputInner # noqa: F401,E501 +from fuji_server.models.data_provenance_output_inner import DataProvenanceOutputInner class DataProvenanceOutput(Model): @@ -13,7 +13,7 @@ def __init__( self, provenance_metadata_included: DataProvenanceOutputInner = None, structured_provenance_available: DataProvenanceOutputInner = None, - ): # noqa: E501 + ): """DataProvenanceOutput - a model defined in Swagger :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 diff --git a/fuji_server/models/data_provenance_output_inner.py b/fuji_server/models/data_provenance_output_inner.py index 4de42754..62e89b52 100644 --- a/fuji_server/models/data_provenance_output_inner.py +++ b/fuji_server/models/data_provenance_output_inner.py @@ -8,7 +8,7 @@ class DataProvenanceOutputInner(Model): Do not edit the class manually. """ - def __init__(self, is_available: bool = True, provenance_metadata: list[dict[str, str]] = None): # noqa: E501 + def __init__(self, is_available: bool = True, provenance_metadata: list[dict[str, str]] | None = None): """DataProvenanceOutputInner - a model defined in Swagger :param is_available: The is_available of this DataProvenanceOutputInner. # noqa: E501 diff --git a/fuji_server/models/debug.py b/fuji_server/models/debug.py index adb7490b..0a59bb4c 100644 --- a/fuji_server/models/debug.py +++ b/fuji_server/models/debug.py @@ -8,7 +8,7 @@ class Debug(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """Debug - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/fair_result_common.py b/fuji_server/models/fair_result_common.py index e1587529..da9439e5 100644 --- a/fuji_server/models/fair_result_common.py +++ b/fuji_server/models/fair_result_common.py @@ -1,7 +1,7 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium class FAIRResultCommon(Model): @@ -12,14 +12,14 @@ class FAIRResultCommon(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: int = 0, - ): # noqa: E501 + ): """FAIRResultCommon - a model defined in Swagger :param id: The id of this FAIRResultCommon. # noqa: E501 @@ -94,7 +94,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -117,7 +117,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -140,7 +140,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -183,7 +183,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this FAIRResultCommon. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -208,7 +208,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/fair_result_common_score.py b/fuji_server/models/fair_result_common_score.py index 1f08f084..dd73219d 100644 --- a/fuji_server/models/fair_result_common_score.py +++ b/fuji_server/models/fair_result_common_score.py @@ -8,7 +8,7 @@ class FAIRResultCommonScore(Model): Do not edit the class manually. """ - def __init__(self, earned: float = 0, total: float = 0): # noqa: E501 + def __init__(self, earned: float = 0, total: float = 0): """FAIRResultCommonScore - a model defined in Swagger :param earned: The earned of this FAIRResultCommonScore. # noqa: E501 diff --git a/fuji_server/models/fair_result_evaluation_criterium.py b/fuji_server/models/fair_result_evaluation_criterium.py index 61b0e333..cbd5ac22 100644 --- a/fuji_server/models/fair_result_evaluation_criterium.py +++ b/fuji_server/models/fair_result_evaluation_criterium.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore class FAIRResultEvaluationCriterium(Model): @@ -11,12 +11,12 @@ class FAIRResultEvaluationCriterium(Model): def __init__( self, - metric_test_name: str = None, - metric_test_requirements: list[dict] = None, + metric_test_name: str | None = None, + metric_test_requirements: list[dict] | None = None, metric_test_score: FAIRResultCommonScore = None, - metric_test_maturity: int = None, + metric_test_maturity: int | None = None, metric_test_status: str = "fail", - ): # noqa: E501 + ): """FAIRResultEvaluationCriterium - a model defined in Swagger :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 @@ -164,7 +164,7 @@ def metric_test_status(self, metric_test_status: str): :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. :type metric_test_status: str """ - allowed_values = ["pass", "fail"] # noqa: E501 + allowed_values = ["pass", "fail"] if metric_test_status not in allowed_values: raise ValueError( f"Invalid value for `metric_test_status` ({metric_test_status}), must be one of {allowed_values}" diff --git a/fuji_server/models/fair_result_evaluation_criterium_requirements.py b/fuji_server/models/fair_result_evaluation_criterium_requirements.py index d28c33c9..dc45bb98 100644 --- a/fuji_server/models/fair_result_evaluation_criterium_requirements.py +++ b/fuji_server/models/fair_result_evaluation_criterium_requirements.py @@ -10,12 +10,12 @@ class FAIRResultEvaluationCriteriumRequirements(Model): def __init__( self, - target: str = None, - modality: str = None, - required: list[str] = None, - tested_on: str = None, - comment: str = None, - ): # noqa: E501 + target: str | None = None, + modality: str | None = None, + required: list[str] | None = None, + tested_on: str | None = None, + comment: str | None = None, + ): """FAIRResultEvaluationCriteriumRequirements - a model defined in Swagger :param target: The target of this FAIRResultEvaluationCriteriumRequirements. # noqa: E501 diff --git a/fuji_server/models/fair_results.py b/fuji_server/models/fair_results.py index 2816943b..6bcdad1d 100644 --- a/fuji_server/models/fair_results.py +++ b/fuji_server/models/fair_results.py @@ -1,6 +1,6 @@ from datetime import datetime -# from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems # noqa: F401,E501 +# from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems from fuji_server import util from fuji_server.models.any_of_fair_results_items import AnyOfFAIRResultsResultsItems from fuji_server.models.base_model_ import Model @@ -14,19 +14,19 @@ class FAIRResults(Model): def __init__( self, - test_id: str = None, - request: dict = None, - resolved_url: str = None, - start_timestamp: datetime = None, - end_timestamp: datetime = None, - expiry_timestamp: datetime = None, - metric_specification: str = None, - metric_version: str = None, - software_version: str = None, - total_metrics: int = None, - summary: dict = None, - results: list[AnyOfFAIRResultsResultsItems] = None, - ): # noqa: E501 + test_id: str | None = None, + request: dict | None = None, + resolved_url: str | None = None, + start_timestamp: datetime | None = None, + end_timestamp: datetime | None = None, + expiry_timestamp: datetime | None = None, + metric_specification: str | None = None, + metric_version: str | None = None, + software_version: str | None = None, + total_metrics: int | None = None, + summary: dict | None = None, + results: list[AnyOfFAIRResultsResultsItems] | None = None, + ): """FAIRResults - a model defined in Swagger :param test_id: The test_id of this FAIRResults. # noqa: E501 diff --git a/fuji_server/models/formal_metadata.py b/fuji_server/models/formal_metadata.py index 7ab6a710..35d80d2a 100644 --- a/fuji_server/models/formal_metadata.py +++ b/fuji_server/models/formal_metadata.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.formal_metadata_output import FormalMetadataOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.formal_metadata_output import FormalMetadataOutput class FormalMetadata(Model): @@ -15,16 +15,16 @@ class FormalMetadata(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: FormalMetadataOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """FormalMetadata - a model defined in Swagger :param id: The id of this FormalMetadata. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this FormalMetadata. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/formal_metadata_output.py b/fuji_server/models/formal_metadata_output.py index 42de2ed0..8511ad3b 100644 --- a/fuji_server/models/formal_metadata_output.py +++ b/fuji_server/models/formal_metadata_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.formal_metadata_output_inner import FormalMetadataOutputInner # noqa: F401,E501 +from fuji_server.models.formal_metadata_output_inner import FormalMetadataOutputInner # noqa: F401 class FormalMetadataOutput(Model): @@ -9,7 +9,7 @@ class FormalMetadataOutput(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """FormalMetadataOutput - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/formal_metadata_output_inner.py b/fuji_server/models/formal_metadata_output_inner.py index 40d8e67e..a23ded48 100644 --- a/fuji_server/models/formal_metadata_output_inner.py +++ b/fuji_server/models/formal_metadata_output_inner.py @@ -9,8 +9,8 @@ class FormalMetadataOutputInner(Model): """ def __init__( - self, serialization_format: str = None, source: str = None, is_metadata_found: bool = False - ): # noqa: E501 + self, serialization_format: str | None = None, source: str | None = None, is_metadata_found: bool = False + ): """FormalMetadataOutputInner - a model defined in Swagger :param serialization_format: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 @@ -81,7 +81,7 @@ def source(self, source: str): :param source: The source of this FormalMetadataOutputInner. :type source: str """ - allowed_values = ["typed_link", "content_negotiate", "structured_data", "sparql_endpoint"] # noqa: E501 + allowed_values = ["typed_link", "content_negotiate", "structured_data", "sparql_endpoint"] if source not in allowed_values: raise ValueError(f"Invalid value for `source` ({source}), must be one of {allowed_values}") diff --git a/fuji_server/models/harvest.py b/fuji_server/models/harvest.py index 5aed6109..c91ab0a4 100644 --- a/fuji_server/models/harvest.py +++ b/fuji_server/models/harvest.py @@ -9,8 +9,8 @@ class Harvest(Model): """ def __init__( - self, object_identifier: str = None, auth_token: str = None, auth_token_type: str = None - ): # noqa: E501 + self, object_identifier: str | None = None, auth_token: str | None = None, auth_token_type: str | None = None + ): """Harvest - a model defined in Swagger :param object_identifier: The object_identifier of this Harvest. # noqa: E501 @@ -63,7 +63,7 @@ def object_identifier(self, object_identifier: str): :type object_identifier: str """ if object_identifier is None: - raise ValueError("Invalid value for `object_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `object_identifier`, must not be `None`") self._object_identifier = object_identifier @@ -110,7 +110,7 @@ def auth_token_type(self, auth_token_type: str): :param auth_token_type: The auth_token_type of this Harvest. :type auth_token_type: str """ - allowed_values = ["Bearer", "Basic"] # noqa: E501 + allowed_values = ["Bearer", "Basic"] if auth_token_type not in allowed_values: raise ValueError( f"Invalid value for `auth_token_type` ({auth_token_type}), must be one of {allowed_values}" diff --git a/fuji_server/models/harvest_results.py b/fuji_server/models/harvest_results.py index b8495ba0..86644242 100644 --- a/fuji_server/models/harvest_results.py +++ b/fuji_server/models/harvest_results.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata # noqa: F401,E501 +from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata class HarvestResults(Model): @@ -9,7 +9,7 @@ class HarvestResults(Model): Do not edit the class manually. """ - def __init__(self, target_uri: str = None, metadata: list[HarvestResultsMetadata] = None): # noqa: E501 + def __init__(self, target_uri: str | None = None, metadata: list[HarvestResultsMetadata] | None = None): """HarvestResults - a model defined in Swagger :param target_uri: The target_uri of this HarvestResults. # noqa: E501 diff --git a/fuji_server/models/harvest_results_metadata.py b/fuji_server/models/harvest_results_metadata.py index 2ec8821f..f013ad27 100644 --- a/fuji_server/models/harvest_results_metadata.py +++ b/fuji_server/models/harvest_results_metadata.py @@ -10,13 +10,13 @@ class HarvestResultsMetadata(Model): def __init__( self, - method: str = None, - url: str = None, - format: str = None, - schema: str = None, - namespaces: list[str] = None, - metadata: dict = None, - ): # noqa: E501 + method: str | None = None, + url: str | None = None, + format: str | None = None, + schema: str | None = None, + namespaces: list[str] | None = None, + metadata: dict | None = None, + ): """HarvestResultsMetadata - a model defined in Swagger :param method: The method of this HarvestResultsMetadata. # noqa: E501 diff --git a/fuji_server/models/identifier_included.py b/fuji_server/models/identifier_included.py index 5d25cb4e..1749d116 100644 --- a/fuji_server/models/identifier_included.py +++ b/fuji_server/models/identifier_included.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.identifier_included_output import IdentifierIncludedOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.identifier_included_output import IdentifierIncludedOutput class IdentifierIncluded(Model): @@ -15,16 +15,16 @@ class IdentifierIncluded(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: IdentifierIncludedOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """IdentifierIncluded - a model defined in Swagger :param id: The id of this IdentifierIncluded. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this IdentifierIncluded. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/identifier_included_output.py b/fuji_server/models/identifier_included_output.py index f14f82e1..ee8f8640 100644 --- a/fuji_server/models/identifier_included_output.py +++ b/fuji_server/models/identifier_included_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.identifier_included_output_inner import IdentifierIncludedOutputInner # noqa: F401,E501 +from fuji_server.models.identifier_included_output_inner import IdentifierIncludedOutputInner class IdentifierIncludedOutput(Model): @@ -9,7 +9,7 @@ class IdentifierIncludedOutput(Model): Do not edit the class manually. """ - def __init__(self, object_content_identifier_included: list[IdentifierIncludedOutputInner] = None): # noqa: E501 + def __init__(self, object_content_identifier_included: list[IdentifierIncludedOutputInner] | None = None): """IdentifierIncludedOutput - a model defined in Swagger :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 diff --git a/fuji_server/models/identifier_included_output_inner.py b/fuji_server/models/identifier_included_output_inner.py index 6cdbf6fa..2cf4e8b0 100644 --- a/fuji_server/models/identifier_included_output_inner.py +++ b/fuji_server/models/identifier_included_output_inner.py @@ -8,7 +8,7 @@ class IdentifierIncludedOutputInner(Model): Do not edit the class manually. """ - def __init__(self, content_identifier_included: str = None): # noqa: E501 + def __init__(self, content_identifier_included: str | None = None): """IdentifierIncludedOutputInner - a model defined in Swagger :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 diff --git a/fuji_server/models/license.py b/fuji_server/models/license.py index 8c3b2032..93b83e6d 100644 --- a/fuji_server/models/license.py +++ b/fuji_server/models/license.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.license_output import LicenseOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.license_output import LicenseOutput class License(Model): @@ -15,16 +15,16 @@ class License(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: LicenseOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """License - a model defined in Swagger :param id: The id of this License. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this License. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/license_output.py b/fuji_server/models/license_output.py index 00f03bcb..bab98134 100644 --- a/fuji_server/models/license_output.py +++ b/fuji_server/models/license_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.license_output_inner import LicenseOutputInner # noqa: F401,E501 +from fuji_server.models.license_output_inner import LicenseOutputInner # noqa: F401 class LicenseOutput(Model): @@ -9,7 +9,7 @@ class LicenseOutput(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """LicenseOutput - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/license_output_inner.py b/fuji_server/models/license_output_inner.py index 334c1613..c92fc759 100644 --- a/fuji_server/models/license_output_inner.py +++ b/fuji_server/models/license_output_inner.py @@ -8,7 +8,7 @@ class LicenseOutputInner(Model): Do not edit the class manually. """ - def __init__(self, license: str = None, osi_approved: bool = False, details_url: str = None): # noqa: E501 + def __init__(self, license: str | None = None, osi_approved: bool = False, details_url: str | None = None): """LicenseOutputInner - a model defined in Swagger :param license: The license of this LicenseOutputInner. # noqa: E501 diff --git a/fuji_server/models/metadata_preserved.py b/fuji_server/models/metadata_preserved.py index f43559e8..c2d55e14 100644 --- a/fuji_server/models/metadata_preserved.py +++ b/fuji_server/models/metadata_preserved.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.metadata_preserved_output import MetadataPreservedOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.metadata_preserved_output import MetadataPreservedOutput class MetadataPreserved(Model): @@ -15,16 +15,16 @@ class MetadataPreserved(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: MetadataPreservedOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """MetadataPreserved - a model defined in Swagger :param id: The id of this MetadataPreserved. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this MetadataPreserved. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/metadata_preserved_output.py b/fuji_server/models/metadata_preserved_output.py index 7fc9e46c..4842b195 100644 --- a/fuji_server/models/metadata_preserved_output.py +++ b/fuji_server/models/metadata_preserved_output.py @@ -8,7 +8,7 @@ class MetadataPreservedOutput(Model): Do not edit the class manually. """ - def __init__(self, metadata_preservation_method: list[str] = None): # noqa: E501 + def __init__(self, metadata_preservation_method: list[str] | None = None): """MetadataPreservedOutput - a model defined in Swagger :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 @@ -48,11 +48,11 @@ def metadata_preservation_method(self, metadata_preservation_method: list[str]): :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. :type metadata_preservation_method: List[str] """ - allowed_values = ["datacite", "tombstone"] # noqa: E501 + allowed_values = ["datacite", "tombstone"] if not set(metadata_preservation_method).issubset(set(allowed_values)): raise ValueError( - "Invalid values for `metadata_preservation_method` [{}], must be a subset of [{}]".format( # noqa: E501 - ", ".join(map(str, set(metadata_preservation_method) - set(allowed_values))), # noqa: E501 + "Invalid values for `metadata_preservation_method` [{}], must be a subset of [{}]".format( + ", ".join(map(str, set(metadata_preservation_method) - set(allowed_values))), ", ".join(map(str, allowed_values)), ) ) diff --git a/fuji_server/models/metric.py b/fuji_server/models/metric.py index 6e1ab3b9..d35ebc0f 100644 --- a/fuji_server/models/metric.py +++ b/fuji_server/models/metric.py @@ -12,17 +12,17 @@ class Metric(Model): def __init__( self, - metric_identifier: str = None, - metric_name: str = None, - description: str = None, - fair_principle: str = None, - evaluation_mechanism: str = None, - date_created: date = None, - date_updated: date = None, - created_by: str = None, - version: float = None, - total_score: int = None, - ): # noqa: E501 + metric_identifier: str | None = None, + metric_name: str | None = None, + description: str | None = None, + fair_principle: str | None = None, + evaluation_mechanism: str | None = None, + date_created: date | None = None, + date_updated: date | None = None, + created_by: str | None = None, + version: float | None = None, + total_score: int | None = None, + ): """Metric - a model defined in Swagger :param metric_identifier: The metric_identifier of this Metric. # noqa: E501 diff --git a/fuji_server/models/metrics.py b/fuji_server/models/metrics.py index 7292624a..66c5c753 100644 --- a/fuji_server/models/metrics.py +++ b/fuji_server/models/metrics.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.metric import Metric # noqa: F401,E501 +from fuji_server.models.metric import Metric class Metrics(Model): @@ -9,7 +9,7 @@ class Metrics(Model): Do not edit the class manually. """ - def __init__(self, total: int = None, metrics: list[Metric] = None): # noqa: E501 + def __init__(self, total: int | None = None, metrics: list[Metric] | None = None): """Metrics - a model defined in Swagger :param total: The total of this Metrics. # noqa: E501 diff --git a/fuji_server/models/output_core_metadata_found.py b/fuji_server/models/output_core_metadata_found.py index ddad9420..b674073c 100644 --- a/fuji_server/models/output_core_metadata_found.py +++ b/fuji_server/models/output_core_metadata_found.py @@ -8,7 +8,7 @@ class OutputCoreMetadataFound(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """OutputCoreMetadataFound - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/output_search_mechanisms.py b/fuji_server/models/output_search_mechanisms.py index 24aa17a6..d130a4f3 100644 --- a/fuji_server/models/output_search_mechanisms.py +++ b/fuji_server/models/output_search_mechanisms.py @@ -8,7 +8,7 @@ class OutputSearchMechanisms(Model): Do not edit the class manually. """ - def __init__(self, mechanism: str = None, mechanism_info: list[str] = None): # noqa: E501 + def __init__(self, mechanism: str | None = None, mechanism_info: list[str] | None = None): """OutputSearchMechanisms - a model defined in Swagger :param mechanism: The mechanism of this OutputSearchMechanisms. # noqa: E501 @@ -51,7 +51,7 @@ def mechanism(self, mechanism: str): :param mechanism: The mechanism of this OutputSearchMechanisms. :type mechanism: str """ - allowed_values = ["metadata registry", "structured data"] # noqa: E501 + allowed_values = ["metadata registry", "structured data"] if mechanism not in allowed_values: raise ValueError(f"Invalid value for `mechanism` ({mechanism}), must be one of {allowed_values}") diff --git a/fuji_server/models/persistence.py b/fuji_server/models/persistence.py index 0647f97e..648bc336 100644 --- a/fuji_server/models/persistence.py +++ b/fuji_server/models/persistence.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.persistence_output import PersistenceOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.persistence_output import PersistenceOutput class Persistence(Model): @@ -15,16 +15,16 @@ class Persistence(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: PersistenceOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """Persistence - a model defined in Swagger :param id: The id of this Persistence. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this Persistence. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/persistence_output.py b/fuji_server/models/persistence_output.py index 019648ea..125eb386 100644 --- a/fuji_server/models/persistence_output.py +++ b/fuji_server/models/persistence_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.persistence_output_inner import PersistenceOutputInner # noqa: F401,E501 +from fuji_server.models.persistence_output_inner import PersistenceOutputInner class PersistenceOutput(Model): @@ -9,7 +9,7 @@ class PersistenceOutput(Model): Do not edit the class manually. """ - def __init__(self, persistent_identifiers: list[PersistenceOutputInner] = None): # noqa: E501 + def __init__(self, persistent_identifiers: list[PersistenceOutputInner] | None = None): """PersistenceOutput - a model defined in Swagger :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. # noqa: E501 diff --git a/fuji_server/models/persistence_output_inner.py b/fuji_server/models/persistence_output_inner.py index 8166a98e..e6132557 100644 --- a/fuji_server/models/persistence_output_inner.py +++ b/fuji_server/models/persistence_output_inner.py @@ -9,8 +9,12 @@ class PersistenceOutputInner(Model): """ def __init__( - self, pid: str = None, pid_scheme: str = None, resolvable_status: bool = False, resolved_url: str = None - ): # noqa: E501 + self, + pid: str | None = None, + pid_scheme: str | None = None, + resolvable_status: bool = False, + resolved_url: str | None = None, + ): """PersistenceOutputInner - a model defined in Swagger :param pid: The pid of this PersistenceOutputInner. # noqa: E501 diff --git a/fuji_server/models/related_resource.py b/fuji_server/models/related_resource.py index 5001774c..df927133 100644 --- a/fuji_server/models/related_resource.py +++ b/fuji_server/models/related_resource.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.related_resource_output import RelatedResourceOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.related_resource_output import RelatedResourceOutput class RelatedResource(Model): @@ -15,16 +15,16 @@ class RelatedResource(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: RelatedResourceOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """RelatedResource - a model defined in Swagger :param id: The id of this RelatedResource. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this RelatedResource. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/related_resource_output.py b/fuji_server/models/related_resource_output.py index a23a64ce..d24d4a61 100644 --- a/fuji_server/models/related_resource_output.py +++ b/fuji_server/models/related_resource_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.related_resource_output_inner import RelatedResourceOutputInner # noqa: F401,E501 +from fuji_server.models.related_resource_output_inner import RelatedResourceOutputInner # noqa: F401 class RelatedResourceOutput(Model): @@ -9,7 +9,7 @@ class RelatedResourceOutput(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """RelatedResourceOutput - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/related_resource_output_inner.py b/fuji_server/models/related_resource_output_inner.py index c304ffeb..3a869488 100644 --- a/fuji_server/models/related_resource_output_inner.py +++ b/fuji_server/models/related_resource_output_inner.py @@ -8,7 +8,7 @@ class RelatedResourceOutputInner(Model): Do not edit the class manually. """ - def __init__(self, related_resource: str = None, relation_type: str = None): # noqa: E501 + def __init__(self, related_resource: str | None = None, relation_type: str | None = None): """RelatedResourceOutputInner - a model defined in Swagger :param related_resource: The related_resource of this RelatedResourceOutputInner. # noqa: E501 diff --git a/fuji_server/models/searchable.py b/fuji_server/models/searchable.py index 74638431..7d6b9453 100644 --- a/fuji_server/models/searchable.py +++ b/fuji_server/models/searchable.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.searchable_output import SearchableOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.searchable_output import SearchableOutput class Searchable(Model): @@ -15,16 +15,16 @@ class Searchable(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: SearchableOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """Searchable - a model defined in Swagger :param id: The id of this Searchable. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this Searchable. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/searchable_output.py b/fuji_server/models/searchable_output.py index eed0c33a..08786e29 100644 --- a/fuji_server/models/searchable_output.py +++ b/fuji_server/models/searchable_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.output_search_mechanisms import OutputSearchMechanisms # noqa: F401,E501 +from fuji_server.models.output_search_mechanisms import OutputSearchMechanisms class SearchableOutput(Model): @@ -9,7 +9,7 @@ class SearchableOutput(Model): Do not edit the class manually. """ - def __init__(self, search_mechanisms: list[OutputSearchMechanisms] = None): # noqa: E501 + def __init__(self, search_mechanisms: list[OutputSearchMechanisms] | None = None): """SearchableOutput - a model defined in Swagger :param search_mechanisms: The search_mechanisms of this SearchableOutput. # noqa: E501 diff --git a/fuji_server/models/semantic_vocabulary.py b/fuji_server/models/semantic_vocabulary.py index 5aec7927..105dd00c 100644 --- a/fuji_server/models/semantic_vocabulary.py +++ b/fuji_server/models/semantic_vocabulary.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.semantic_vocabulary_output import SemanticVocabularyOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.semantic_vocabulary_output import SemanticVocabularyOutput class SemanticVocabulary(Model): @@ -15,16 +15,16 @@ class SemanticVocabulary(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: SemanticVocabularyOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """SemanticVocabulary - a model defined in Swagger :param id: The id of this SemanticVocabulary. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this SemanticVocabulary. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/semantic_vocabulary_output.py b/fuji_server/models/semantic_vocabulary_output.py index 58e1d07b..5e7416d0 100644 --- a/fuji_server/models/semantic_vocabulary_output.py +++ b/fuji_server/models/semantic_vocabulary_output.py @@ -1,6 +1,6 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner # noqa: F401,E501 +from fuji_server.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner # noqa: F401 class SemanticVocabularyOutput(Model): @@ -9,7 +9,7 @@ class SemanticVocabularyOutput(Model): Do not edit the class manually. """ - def __init__(self): # noqa: E501 + def __init__(self): """SemanticVocabularyOutput - a model defined in Swagger""" self.swagger_types = {} diff --git a/fuji_server/models/semantic_vocabulary_output_inner.py b/fuji_server/models/semantic_vocabulary_output_inner.py index bea7bab2..c7d1118b 100644 --- a/fuji_server/models/semantic_vocabulary_output_inner.py +++ b/fuji_server/models/semantic_vocabulary_output_inner.py @@ -8,7 +8,7 @@ class SemanticVocabularyOutputInner(Model): Do not edit the class manually. """ - def __init__(self, namespace: str = None, is_namespace_active: bool = False): # noqa: E501 + def __init__(self, namespace: str | None = None, is_namespace_active: bool = False): """SemanticVocabularyOutputInner - a model defined in Swagger :param namespace: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 diff --git a/fuji_server/models/standardised_protocol_data.py b/fuji_server/models/standardised_protocol_data.py index ecfc605d..89ab52ae 100644 --- a/fuji_server/models/standardised_protocol_data.py +++ b/fuji_server/models/standardised_protocol_data.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.standardised_protocol_data_output import StandardisedProtocolDataOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.standardised_protocol_data_output import StandardisedProtocolDataOutput class StandardisedProtocolData(Model): @@ -15,16 +15,16 @@ class StandardisedProtocolData(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: StandardisedProtocolDataOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """StandardisedProtocolData - a model defined in Swagger :param id: The id of this StandardisedProtocolData. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this StandardisedProtocolData. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/standardised_protocol_data_output.py b/fuji_server/models/standardised_protocol_data_output.py index 96a1af75..6fd4ff67 100644 --- a/fuji_server/models/standardised_protocol_data_output.py +++ b/fuji_server/models/standardised_protocol_data_output.py @@ -8,7 +8,7 @@ class StandardisedProtocolDataOutput(Model): Do not edit the class manually. """ - def __init__(self, standard_data_protocol: str = None): # noqa: E501 + def __init__(self, standard_data_protocol: str | None = None): """StandardisedProtocolDataOutput - a model defined in Swagger :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 diff --git a/fuji_server/models/standardised_protocol_metadata.py b/fuji_server/models/standardised_protocol_metadata.py index 5753d670..aeda0370 100644 --- a/fuji_server/models/standardised_protocol_metadata.py +++ b/fuji_server/models/standardised_protocol_metadata.py @@ -1,10 +1,9 @@ -# noqa: F401,E501 from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium from fuji_server.models.standardised_protocol_metadata_output import ( StandardisedProtocolMetadataOutput, ) @@ -18,16 +17,16 @@ class StandardisedProtocolMetadata(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: StandardisedProtocolMetadataOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """StandardisedProtocolMetadata - a model defined in Swagger :param id: The id of this StandardisedProtocolMetadata. # noqa: E501 @@ -112,7 +111,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -135,7 +134,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -158,7 +157,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -201,7 +200,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this StandardisedProtocolMetadata. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -226,7 +225,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/standardised_protocol_metadata_output.py b/fuji_server/models/standardised_protocol_metadata_output.py index 1248da75..e1b5e1d8 100644 --- a/fuji_server/models/standardised_protocol_metadata_output.py +++ b/fuji_server/models/standardised_protocol_metadata_output.py @@ -8,7 +8,7 @@ class StandardisedProtocolMetadataOutput(Model): Do not edit the class manually. """ - def __init__(self, standard_metadata_protocol: str = None): # noqa: E501 + def __init__(self, standard_metadata_protocol: str | None = None): """StandardisedProtocolMetadataOutput - a model defined in Swagger :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 diff --git a/fuji_server/models/uniqueness.py b/fuji_server/models/uniqueness.py index 07e44da2..8cf73eeb 100644 --- a/fuji_server/models/uniqueness.py +++ b/fuji_server/models/uniqueness.py @@ -1,10 +1,10 @@ from fuji_server import util from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug # noqa: F401,E501 -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401,E501 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore # noqa: F401,E501 -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium # noqa: F401,E501 -from fuji_server.models.uniqueness_output import UniquenessOutput # noqa: F401,E501 +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.uniqueness_output import UniquenessOutput class Uniqueness(Model): @@ -15,16 +15,16 @@ class Uniqueness(Model): def __init__( self, - id: int = None, - metric_identifier: str = None, - metric_name: str = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] = None, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, maturity: str = "incomplete", output: UniquenessOutput = None, test_debug: Debug = None, - ): # noqa: E501 + ): """Uniqueness - a model defined in Swagger :param id: The id of this Uniqueness. # noqa: E501 @@ -109,7 +109,7 @@ def id(self, id: int): :type id: int """ if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") self._id = id @@ -132,7 +132,7 @@ def metric_identifier(self, metric_identifier: str): :type metric_identifier: str """ if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") self._metric_identifier = metric_identifier @@ -155,7 +155,7 @@ def metric_name(self, metric_name: str): :type metric_name: str """ if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `metric_name`, must not be `None`") self._metric_name = metric_name @@ -198,7 +198,7 @@ def test_status(self, test_status: str): :param test_status: The test_status of this Uniqueness. :type test_status: str """ - allowed_values = ["pass", "fail", "indeterminate"] # noqa: E501 + allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -223,7 +223,7 @@ def score(self, score: FAIRResultCommonScore): :type score: FAIRResultCommonScore """ if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") # noqa: E501 + raise ValueError("Invalid value for `score`, must not be `None`") self._score = score diff --git a/fuji_server/models/uniqueness_output.py b/fuji_server/models/uniqueness_output.py index 5d09a916..b477973e 100644 --- a/fuji_server/models/uniqueness_output.py +++ b/fuji_server/models/uniqueness_output.py @@ -8,7 +8,7 @@ class UniquenessOutput(Model): Do not edit the class manually. """ - def __init__(self, guid: str = None, guid_scheme: str = None): # noqa: E501 + def __init__(self, guid: str | None = None, guid_scheme: str | None = None): """UniquenessOutput - a model defined in Swagger :param guid: The guid of this UniquenessOutput. # noqa: E501 diff --git a/pyproject.toml b/pyproject.toml index f07dd7f7..e9936f4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -153,11 +153,15 @@ markers = [ testpaths = "tests" [tool.ruff] +ignore = [ + "RUF012" # mutable-class-default +] line-length = 120 select = [ - "F", # pyflakes - "I", # isort - "UP" # pyupgrade + "F", # pyflakes + "I", # isort + "UP", # pyupgrade + "RUF" # ruff ] target-version = "py311"