Skip to content

Commit

Permalink
change to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
BradleySappington committed Jan 30, 2024
1 parent 770bdb3 commit f581e1d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run: conda info

- name: Run Lint Checks
run: tox -e flake8
run: tox -e lint-check

- name: Run tests with requirements file
if: ${{ contains(matrix.toxenv,'-latest') }}
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,20 @@ omit = [
"*/webbpsf/*/*/tests/*",
"*/webbpsf/version*",
]

[tool.ruff]
extend-exclude = [
'.git',
'__pycache__',
'build',
'dist',
'.eggs',
'.tox',
]
ignore = [
'E401', # Multiple imports not allowed on single line
'E402', # Module level import not at top of file
'E501', # Line too long
'E701', # Multiple-statements on one line (colon) NEEDS TO BE FIXED
'E722', # Do not use bare `except`
]
10 changes: 7 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ deps =
commands =
pycodestyle webbpsf

[testenv:flake8]
exclude= .git,__pycache__, test*
max-line-length = 120
[testenv:lint-check]
description = check code style, e.g. with ruff
skip_install = true
deps =
ruff
commands =
ruff . {posargs}

0 comments on commit f581e1d

Please sign in to comment.