Skip to content

Commit

Permalink
feat: switch to ruff for linting (#90)
Browse files Browse the repository at this point in the history
This will greatly increase the speed of the linting; it's setup to be
1:1 compatible with flake8 at the moment.  We have the option to also
require formatting checks here, but for the moment, it sticks only to
linting.
  • Loading branch information
hlieberman authored Dec 22, 2023
1 parent fff27c6 commit 5c4658b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
python -m pip install -e .[dev] -r requirements.txt
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --max-complexity=14 --max-line-length=127 --show-source --statistics
ruff check . --statistics
# - name: Test with pytest
# run: |
# pytest
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line-length = 127
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
license='GPL-3.0',
packages=find_packages(),
include_package_data=True,
extras_require={
'dev': [
'ruff',
]
},
install_requires=[
'Click >= 7.0',
'beancount >= 2.3.5',
Expand Down

0 comments on commit 5c4658b

Please sign in to comment.