From 1ffd8a0fdd4c3a3966cda3e4a134754d54ff6435 Mon Sep 17 00:00:00 2001 From: Julian Vogel Date: Thu, 28 Nov 2024 13:28:24 +0100 Subject: [PATCH] style: adapt to new ruff version 0.8 --- src/pdf2aas/dictionary/__init__.py | 4 ++-- src/pdf2aas/evaluation/__init__.py | 2 +- src/pdf2aas/extractor/__init__.py | 4 ++-- src/pdf2aas/generator/__init__.py | 4 ++-- src/pdf2aas/generator/aas_template.py | 4 ++-- src/pdf2aas/model/__init__.py | 2 +- src/pdf2aas/preprocessor/__init__.py | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/pdf2aas/dictionary/__init__.py b/src/pdf2aas/dictionary/__init__.py index 051f5df..a33e531 100644 --- a/src/pdf2aas/dictionary/__init__.py +++ b/src/pdf2aas/dictionary/__init__.py @@ -6,9 +6,9 @@ from .etim import ETIM __all__ = [ - "Dictionary", - "dictionary_serializer", "CDD", "ECLASS", "ETIM", + "Dictionary", + "dictionary_serializer", ] diff --git a/src/pdf2aas/evaluation/__init__.py b/src/pdf2aas/evaluation/__init__.py index 7cc528a..e4905df 100644 --- a/src/pdf2aas/evaluation/__init__.py +++ b/src/pdf2aas/evaluation/__init__.py @@ -8,9 +8,9 @@ from .values import EvaluationValues __all__ = [ - "EvaluationArticle", "Evaluation", "EvaluationAAS", + "EvaluationArticle", "EvaluationCounts", "EvaluationPrompt", "EvaluationValues", diff --git a/src/pdf2aas/extractor/__init__.py b/src/pdf2aas/extractor/__init__.py index ef6110f..06de551 100644 --- a/src/pdf2aas/extractor/__init__.py +++ b/src/pdf2aas/extractor/__init__.py @@ -6,9 +6,9 @@ from .property_llm_search import PropertyLLMSearch __all__ = [ + "CustomLLMClient", + "CustomLLMClientHTTP", "Extractor", "PropertyLLM", "PropertyLLMSearch", - "CustomLLMClient", - "CustomLLMClientHTTP", ] diff --git a/src/pdf2aas/generator/__init__.py b/src/pdf2aas/generator/__init__.py index 11da1cf..6dc22ae 100644 --- a/src/pdf2aas/generator/__init__.py +++ b/src/pdf2aas/generator/__init__.py @@ -6,8 +6,8 @@ from .csv import CSV __all__ = [ - "Generator", "CSV", - "AASTemplate", "AASSubmodelTechnicalData", + "AASTemplate", + "Generator", ] diff --git a/src/pdf2aas/generator/aas_template.py b/src/pdf2aas/generator/aas_template.py index cd43b89..455e1cc 100644 --- a/src/pdf2aas/generator/aas_template.py +++ b/src/pdf2aas/generator/aas_template.py @@ -236,9 +236,9 @@ def _fill_definition_from_data_spec( if ( definition.values is None - or len(definition.values) == 0 + or (len(definition.values) == 0 and data_spec.value_list is not None - and len(data_spec.value_list) > 0 + and len(data_spec.value_list) > 0) ): values: list[dict[ValueDefinitionKeyType, str]] = [ { diff --git a/src/pdf2aas/model/__init__.py b/src/pdf2aas/model/__init__.py index 6dc130f..ce48d88 100644 --- a/src/pdf2aas/model/__init__.py +++ b/src/pdf2aas/model/__init__.py @@ -5,9 +5,9 @@ from .property_definition import PropertyDefinition, SimplePropertyDataType, ValueDefinitionKeyType __all__ = [ - "PropertyDefinition", "ClassDefinition", "Property", + "PropertyDefinition", "SimplePropertyDataType", "ValueDefinitionKeyType", ] diff --git a/src/pdf2aas/preprocessor/__init__.py b/src/pdf2aas/preprocessor/__init__.py index f8ca1d2..ced759c 100644 --- a/src/pdf2aas/preprocessor/__init__.py +++ b/src/pdf2aas/preprocessor/__init__.py @@ -7,11 +7,11 @@ from .text import Text __all__ = [ - "Preprocessor", "PDF2HTMLEX", - "ReductionLevel", - "PDFium", "PDFPlumber", "PDFPlumberTable", + "PDFium", + "Preprocessor", + "ReductionLevel", "Text", ]