Skip to content

Commit

Permalink
pass ruff everywhere and update github action with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Galileo-Galilei committed Aug 12, 2023
1 parent 23f59a1 commit 3a9ca01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion kedro_pandera/framework/hooks/pandera_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (

Check warning on line 51 in kedro_pandera/framework/hooks/pandera_hook.py

View check run for this annotation

Codecov / codecov/patch

kedro_pandera/framework/hooks/pandera_hook.py#L50-L51

Added lines #L50 - L51 were not covered by tests
catalog._data_sets[name].metadata is not None
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[tool.isort]
profile="black"
multi_line_output=3


[tool.ruff]
line-length = 88
show-fixes = true
Expand Down

0 comments on commit 3a9ca01

Please sign in to comment.