diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 29227d4..21ef245 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -31,15 +31,13 @@ jobs: run: | sudo apt-get install build-essential pip install --upgrade uv - uv pip install --system flake8 pytest + echo -e 'ruff\npytest\n' >> requirements.txt uv pip install --system -r requirements.txt - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # 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 + ruff check proximal - name: Test with pytest run: | uv pip install --system . diff --git a/proximal/examples/test_matengine.py b/proximal/examples/test_matengine.py index dfa9f9f..40e06fa 100644 --- a/proximal/examples/test_matengine.py +++ b/proximal/examples/test_matengine.py @@ -43,4 +43,4 @@ eng.quit() # Wait until done -raw_input("Press Enter to continue...") +input("Press Enter to continue...") diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d7f9aa3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,8 @@ +[tool.ruff] +line-length=127 + +[tool.ruff.lint] +select=["E9", "F63", "F7", "F82", "C90"] + +[tool.ruff.lint.mccabe] +max-complexity=30