From 3a9ca018238cd9ba800fe97a55e09302f528055a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yolan=20Honor=C3=A9-Roug=C3=A9?= Date: Sat, 12 Aug 2023 22:55:30 +0200 Subject: [PATCH] pass ruff everywhere and update github action with ruff --- .github/workflows/test.yml | 10 ++-------- kedro_pandera/framework/hooks/pandera_hook.py | 4 +++- pyproject.toml | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 570bdf5..5a99f7b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,17 +33,11 @@ jobs: if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' # linting should occur only once in the loop run: | black . --check - - name: Check import order with isort - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' # linting should occur only once in the loop - run: | - isort . --check-only - - name: Lint with flake8 + - name: Lint with ruff if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' # linting should occur only once in the loop run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude kedro_pandera/template/project/run.py - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude kedro_pandera/template/project/run.py + ruff check . - name: Test with pytest and generate coverage report run: | pytest --cov=./ --cov-report=xml diff --git a/kedro_pandera/framework/hooks/pandera_hook.py b/kedro_pandera/framework/hooks/pandera_hook.py index f1c9d9e..0d37c60 100644 --- a/kedro_pandera/framework/hooks/pandera_hook.py +++ b/kedro_pandera/framework/hooks/pandera_hook.py @@ -44,7 +44,9 @@ def after_context_created( ) @hook_impl - def before_node_run(self, node, catalog, inputs, is_async, session_id): + def before_node_run( # noqa : PLR0913 + self, node, catalog, inputs, is_async, session_id + ): for name, data in inputs.items(): if ( catalog._data_sets[name].metadata is not None diff --git a/pyproject.toml b/pyproject.toml index a1167df..e4b65c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,3 @@ -[tool.isort] -profile="black" -multi_line_output=3 - - [tool.ruff] line-length = 88 show-fixes = true