Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,20 @@ jobs:
run: poetry install -v
- name: Run tests
run: poetry run pytest -v
- name: Install package into separate venv
shell: bash
run: |
venv_dir="$RUNNER_TEMP/dog_food_venv"
python3 -m venv "${venv_dir}"
if [[ "$RUNNER_OS" == "Windows" ]]; then
binary_folder_name="Scripts"
else
binary_folder_name="bin"
fi
DOG_FOOD_VENV_BIN="${venv_dir}/${binary_folder_name}"
echo "DOG_FOOD_VENV_BIN=${venv_dir}/${binary_folder_name}" >> "$GITHUB_ENV"
${DOG_FOOD_VENV_BIN}/pip install .
- name: Lint our own package
shell: bash
run: |
${DOG_FOOD_VENV_BIN}/nps lint .
125 changes: 92 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""example of a python file with linter errors.
"""
"""example of a python file with linter errors."""

import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""example of a python file with linter errors.
"""
"""example of a python file with linter errors."""

import pathlib, glob # noqa: E401, F401 - multiple imports on one line (auto-generated noqa), 'glob' imported but unused (auto-generated noqa)
import os # noqa: I100 - Import statements are in the wrong order. 'import os' should be before 'import pathlib, glob' (auto-generated noqa)
Expand All @@ -24,7 +23,7 @@

def _test_os_name():
for (
os # noqa: F402 - import 'os' from line 5 shadowed by loop variable (auto-generated noqa)
os # noqa: F402 - import 'os' from line 4 shadowed by loop variable (auto-generated noqa)
) in range(3):
print(os)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""example of a python file with linter errors in flow and structure of code.
"""
"""example of a python file with linter errors in flow and structure of code."""

l = 5 # noqa: E741 - ambiguous variable name 'l' (auto-generated noqa)
y = False
Expand Down