Skip to content

Commit

Permalink
Update ruff CI syntax (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
amureki authored Jun 28, 2024
1 parent 7f7c6df commit 8754697
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
lint-command:
- ruff --output-format=github .
- ruff check --output-format=github .
- black --check --diff .
- mypy model_bakery
steps:
Expand Down
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ disallow_untyped_calls = true
[tool.pytest.ini_options]
addopts = "--tb=short -rxs --nomigrations"

[tool.ruff]
target-version = "py38"

[tool.ruff.lint]
select = [
"S", # flake8-bandit
"B", # flake8-bugbear
Expand All @@ -113,19 +111,19 @@ select = [

ignore = ["B904", "E501", "S101", "D1", "D212"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/test_*.py" = [
"S",
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports=true
split-on-trailing-comma=true
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]
force-wrap-aliases=true

[tool.ruff.isort.sections]
[tool.ruff.lint.isort.sections]
django = ["django"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"
2 changes: 1 addition & 1 deletion tests/test_baker.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ def test_creates_instance_for_model_with_list(self):
instance = baker.make(models.BaseModelForList, fk=["foo"])

assert instance.id
assert ["foo"] == instance.fk
assert instance.fk == ["foo"]


@pytest.mark.django_db
Expand Down

0 comments on commit 8754697

Please sign in to comment.