From cdf2d5c61d4b2a5cc8296c93e8756e2427a11bc6 Mon Sep 17 00:00:00 2001 From: Andreas Wicenec Date: Mon, 19 Feb 2024 17:34:40 +0800 Subject: [PATCH] Fixed liniting and black errors --- Makefile | 8 ++++---- wallaby_hires/__init__.py | 1 - wallaby_hires/apps.py | 12 ++++-------- wallaby_hires/data.py | 19 +++---------------- 4 files changed, 11 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index aeb55384..e071e794 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,14 @@ install: ## Install the project in dev mode. .PHONY: fmt fmt: ## Format code using black & isort. $(ENV_PREFIX)isort wallaby_hires/ - $(ENV_PREFIX)black -l 79 wallaby_hires/ - $(ENV_PREFIX)black -l 79 tests/ + $(ENV_PREFIX)black -l 90 wallaby_hires/ + $(ENV_PREFIX)black -l 90 tests/ .PHONY: lint lint: ## Run pep8, black, mypy linters. $(ENV_PREFIX)flake8 wallaby_hires/ - $(ENV_PREFIX)black -l 79 --check wallaby_hires/ - $(ENV_PREFIX)black -l 79 --check tests/ + $(ENV_PREFIX)black -l 90 --check wallaby_hires/ + $(ENV_PREFIX)black -l 90 --check tests/ $(ENV_PREFIX)mypy --ignore-missing-imports wallaby_hires/ .PHONY: test diff --git a/wallaby_hires/__init__.py b/wallaby_hires/__init__.py index 4960decf..df3153c1 100644 --- a/wallaby_hires/__init__.py +++ b/wallaby_hires/__init__.py @@ -1,6 +1,5 @@ __package__ = "wallaby_hires" # The following imports are the binding to the DALiuGE system -from dlg import droputils, utils # extend the following as required from .apps import MyAppDROP diff --git a/wallaby_hires/apps.py b/wallaby_hires/apps.py index 64bb6d2a..49f25772 100644 --- a/wallaby_hires/apps.py +++ b/wallaby_hires/apps.py @@ -10,18 +10,14 @@ Be creative! do whatever you need to do! """ import logging -import pickle -from dlg.drop import BarrierAppDROP, BranchAppDrop +from dlg.drop import BarrierAppDROP from dlg.meta import ( dlg_batch_input, dlg_batch_output, - dlg_bool_param, dlg_component, dlg_float_param, - dlg_int_param, dlg_streaming_input, - dlg_string_param, ) logger = logging.getLogger(__name__) @@ -30,12 +26,12 @@ # @brief MyApp # @details Template app for demonstration only! # Replace the documentation with whatever you want/need to show in the DALiuGE -# workflow editor. The appclass parameter should contain the relative Pythonpath -# to import MyApp. +# workflow editor. The appclass parameter should contain the relative +# Pythonpath to import MyApp. # # @par EAGLE_START # @param category PythonApp -# @param[in] param/appclass Application Class/wallaby_hires.MyApp/String/readonly/ +# @param[in] param/appclass Application Class/wallaby_hires.MyApp/String/ # \~English Import direction for application class # @param[in] param/dummy Dummy parameter/ /String/readwrite/ # \~English Dummy modifyable parameter diff --git a/wallaby_hires/data.py b/wallaby_hires/data.py index 942540c8..bbcaf9ad 100644 --- a/wallaby_hires/data.py +++ b/wallaby_hires/data.py @@ -9,22 +9,9 @@ Be creative! do whatever you need to do! """ -import base64 import logging -import os -import pickle from dlg.drop import AbstractDROP -from dlg.meta import ( - dlg_batch_input, - dlg_batch_output, - dlg_bool_param, - dlg_component, - dlg_float_param, - dlg_int_param, - dlg_streaming_input, - dlg_string_param, -) logger = logging.getLogger(__name__) @@ -32,8 +19,8 @@ # @brief MyData # @details Template app for demonstration only! # Replace the documentation with whatever you want/need to show in the DALiuGE -# workflow editor. The dataclass parameter should contain the relative Pythonpath -# to import MyApp. +# workflow editor. The dataclass parameter should contain the relative +# Pythonpath to import MyApp. # # @par EAGLE_START # @param category DataDrop @@ -64,4 +51,4 @@ def getIO(self): @property def dataURL(self): - return f"Hello from the dataURL method" + return "Hello from the dataURL method"