From 134f30b27cf41bdcde284bdc72bc220cb4b53c63 Mon Sep 17 00:00:00 2001 From: Martin Obersteiner Date: Mon, 25 Nov 2024 10:56:55 +0100 Subject: [PATCH] fix: fix quibbles from ruff 0.8.0 --- invenio_records_lom/__init__.py | 2 +- invenio_records_lom/fixtures/__init__.py | 2 +- invenio_records_lom/records/systemfields/__init__.py | 4 ++-- invenio_records_lom/services/__init__.py | 2 +- invenio_records_lom/utils/__init__.py | 10 +++++----- invenio_records_lom/utils/util.py | 3 +-- pyproject.toml | 1 - 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/invenio_records_lom/__init__.py b/invenio_records_lom/__init__.py index 7d74ca0..83ae9a9 100644 --- a/invenio_records_lom/__init__.py +++ b/invenio_records_lom/__init__.py @@ -14,7 +14,7 @@ __version__ = "0.18.0" __all__ = ( + "InvenioRecordsLOM", "__version__", "current_records_lom", - "InvenioRecordsLOM", ) diff --git a/invenio_records_lom/fixtures/__init__.py b/invenio_records_lom/fixtures/__init__.py index cb6ff50..d933681 100644 --- a/invenio_records_lom/fixtures/__init__.py +++ b/invenio_records_lom/fixtures/__init__.py @@ -17,6 +17,6 @@ __all__ = ( "create_fake_data", "publish_fake_record", - "publish_fake_records", "publish_fake_record_over_celery", + "publish_fake_records", ) diff --git a/invenio_records_lom/records/systemfields/__init__.py b/invenio_records_lom/records/systemfields/__init__.py index e134c01..2cb4dc2 100644 --- a/invenio_records_lom/records/systemfields/__init__.py +++ b/invenio_records_lom/records/systemfields/__init__.py @@ -27,8 +27,8 @@ "LOMPIDFieldContext", "LOMRecordIdProvider", "LOMResolver", - "ParentRecordAccessField", + "LomRecordStatisticsField", "PIDLOMRelation", + "ParentRecordAccessField", "RecordAccessField", - "LomRecordStatisticsField", ) diff --git a/invenio_records_lom/services/__init__.py b/invenio_records_lom/services/__init__.py index 5d188d8..c965a19 100644 --- a/invenio_records_lom/services/__init__.py +++ b/invenio_records_lom/services/__init__.py @@ -17,8 +17,8 @@ __all__ = ( "LOMDraftFilesServiceConfig", - "LOMRecordPermissionPolicy", "LOMRecordFilesServiceConfig", + "LOMRecordPermissionPolicy", "LOMRecordService", "LOMRecordServiceConfig", ) diff --git a/invenio_records_lom/utils/__init__.py b/invenio_records_lom/utils/__init__.py index 4f69fd6..d5a15ed 100644 --- a/invenio_records_lom/utils/__init__.py +++ b/invenio_records_lom/utils/__init__.py @@ -22,15 +22,15 @@ __all__ = ( "DotAccessWrapper", - "get_learningresourcetypedict", - "get_oefosdict", - "LOMMetadata", "LOMCourseMetadata", + "LOMDuplicateRecordError", + "LOMMetadata", "LOMRecordData", - "make_lom_vcard", "build_record_unique_id", "check_about_duplicate", "create_record", + "get_learningresourcetypedict", + "get_oefosdict", + "make_lom_vcard", "update_record", - "LOMDuplicateRecordError", ) diff --git a/invenio_records_lom/utils/util.py b/invenio_records_lom/utils/util.py index 7c7445e..ef52072 100644 --- a/invenio_records_lom/utils/util.py +++ b/invenio_records_lom/utils/util.py @@ -7,7 +7,7 @@ """Utilities for creation of LOM-compliant metadata.""" -from collections.abc import MutableMapping +from collections.abc import Iterator, MutableMapping from csv import reader from importlib import resources from json import load @@ -15,7 +15,6 @@ from re import compile as re_compile from re import sub from time import sleep -from typing import Iterator from flask_principal import Identity from invenio_records_resources.services.base import Service diff --git a/pyproject.toml b/pyproject.toml index 526c782..3902efa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,6 @@ exclude = ["docs"] [tool.ruff.lint] select = ["ALL"] ignore = [ - "ANN101", "ANN102", "D203", "D211", "D212", "D213", "E501", "FA100", "FA102",