Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ruff warnings #471

Merged
merged 1 commit into from
Apr 20, 2024
Merged
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ tests:
.PHONY: reformat
reformat:
ruff format .
ruff --fix .
ruff check . --fix

.PHONY: lint
lint:
ruff .
ruff check .

.PHONY: docs
docs: clean
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ Source = "https://github.com/zostera/django-icons"

[tool.ruff]
fix = false
line-length = 120
src = ["src"]
target-version = "py38"

[tool.ruff.lint]
fixable = [
"I001", # isort (sorting)
"F", # flake8
Expand All @@ -56,21 +61,18 @@ ignore = [
"D212", # D212: Multi-line docstring summary should start at the first line
"D301", # D301: Use r”“” if any backslashes in a docstring (unclear how else to handle backslashes in docstrings)
]
line-length = 120
select = [
"D", # pydocstyle
"E", # pycodestyle
"F", # flake8
"I", # isort
"UP", # pyupgrade
]
src = ["src"]
target-version = "py38"
unfixable = [
"F8", # names in flake8, such as defined but unused variables
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["django_marina", "app"]
known-third-party = ["django"]

Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tox==4.14.2
coverage==7.4.4
ruff==0.3.7
ruff==0.4.1