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

Update ruff CI syntax #481

Merged
merged 3 commits into from
Jun 28, 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
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