Skip to content

Commit

Permalink
set ruff as default linter
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniBodor committed Jan 15, 2024
1 parent 466b254 commit 68ee7a6
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
extras-require: test
- name: Check style against standards using prospector
run: prospector --die-on-tool-error
- name: Check style against standards using ruff
run: ruff .
50 changes: 0 additions & 50 deletions .prospector.yml

This file was deleted.

62 changes: 58 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ dependencies = [
"tqdm >= 4.63.0",
"freesasa >= 2.1.0",
"tensorboard >= 0.9.0",
"protobuf >= 3.20.1"
"protobuf >= 3.20.1",
"ruff",
]

[project.optional-dependencies]
# development dependency groups
test = [
"pytest >= 7.4.0",
"pylint <= 2.17.5",
"prospector[with_pyroma] <= 1.10.2",
"bump2version",
"coverage",
"pycodestyle",
Expand Down Expand Up @@ -88,5 +87,60 @@ exclude = ["tests*", "*tests.*", "*tests"]
"*" = [
"*.xlsx",
"*.param",
"*.top",
"*.top",
"*residue-classes"]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
extend-exclude = [
"docs",
"reduce",
]
line-length = 159
select = [
"F", # Pyflakes
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"I", # isort
"D", # pydocstyle
"B", # flake8-bugbear
]
ignore = [
"D100", # Missing module docstring
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing public package docstring
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
# The following list excludes rules irrelevant to the Google style
"D203", # 1 blank line required before class docstring
"D204",
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D215",
"D400",
"D401",
"D404", # First word of the docstring should not be This
"D406",
"D407",
"D408",
"D409",
"D413",
# flake8-bugbear
"B028", # No explicit `stacklevel` keyword argument found
]

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

[tool.ruff.lint]
extend-safe-fixes = [
"D415", # First line should end with a period, question mark, or exclamation point
"D300", # Use triple double quotes `"""`
"D200", # One-line docstring should fit on one line
]

[tool.ruff.isort]
known-first-party = ["deeprank2"]

0 comments on commit 68ee7a6

Please sign in to comment.