Skip to content

Commit

Permalink
Fix code to align with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Dec 13, 2024
1 parent fc8d593 commit 646e796
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
rev: v0.8.3
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_cli_level = "INFO"

[tool.coverage.run]
omit = "*/__init__.py"
omit = ["*/__init__.py"]
6 changes: 1 addition & 5 deletions sertit/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,14 +824,10 @@ def find_files(
class CustomDecoder(JSONDecoder):
"""Decoder for JSON with methods for datetimes"""

# pylint: disable=W0221
# Override the default method
def __init__(self, *args, **kwargs):
json.JSONDecoder.__init__(self, object_hook=self.object_hook, *args, **kwargs) # noqa: B026
json.JSONDecoder.__init__(self, *args, object_hook=self.object_hook, **kwargs)

# pylint: disable=E0202, R0201
# - An attribute defined in json.decoder line 319 hides this method (method-hidden)
# - Method could be a function (no-self-use)
def object_hook(self, obj: Any):
"""
Overload of object_hook function that deals with :code:`datetime.datetime`
Expand Down

0 comments on commit 646e796

Please sign in to comment.