Skip to content

Commit

Permalink
Fixed ruff errors and updated config.
Browse files Browse the repository at this point in the history
  • Loading branch information
xsedla1o committed Feb 2, 2024
1 parent 9f2b740 commit 0bcaaae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.1.15'
rev: 'v0.2.0'
hooks:
- id: ruff
args: [ "--fix", "." ]
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ target-version = "py39"
extend-exclude = ["install", "docker"]
line-length = 100
show-fixes = true

[tool.ruff.lint]
select = [
"I", # isort
"UP", # PyUpgrade
Expand All @@ -90,11 +92,11 @@ ignore = [
"PLR0915", # Too many statements
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"dp3/task_processing/task_queue.py" = ["PLR0913"]
"dp3/common/callback_registrar.py" = ["PLR0913"]
"dp3/common/scheduler.py" = ["PLR0913"]

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
# Most arguments in a function call.
max-args = 8
2 changes: 1 addition & 1 deletion tests/test_common/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_master_records(self, etype: str, **kwargs):

def get_master_record(self, etype: str, eid: str, projection=None) -> dict:
if projection is not None:
projection["_id"] = True if "_id" not in projection else projection["_id"]
projection["_id"] = projection.get("_id", True)
return {
key: val
for key, val in self.db_content[etype][eid].items()
Expand Down

0 comments on commit 0bcaaae

Please sign in to comment.