Skip to content

Commit

Permalink
Update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp authored Mar 25, 2024
1 parent 7bc8c10 commit b612e0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
files: ^(.*\.toml)$

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.3.4
hooks:
- id: ruff
args: [ --exit-non-zero-on-fix, --fix ]
Expand All @@ -51,7 +51,7 @@ repos:
- repo: https://github.com/psf/black
hooks:
- id: black
rev: 24.1.1
rev: 24.3.0

- repo: https://github.com/LilSpazJoekp/docstrfmt
hooks:
Expand Down
4 changes: 1 addition & 3 deletions asyncpraw/models/reddit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def __eq__(self, other: Any | str) -> bool:
def __getattr__(self, attribute: str) -> Any:
"""Return the value of ``attribute``."""
if not attribute.startswith("_") and not self._fetched:
msg = "{0!r} object has no attribute {1!r}. {0!r} object has not been fetched, did you forget to execute '.load()'?".format(
self.__class__.__name__, attribute
)
msg = f"{self.__class__.__name__!r} object has no attribute {attribute!r}. {self.__class__.__name__!r} object has not been fetched, did you forget to execute '.load()'?"
raise AttributeError(msg)
msg = f"{self.__class__.__name__!r} object has no attribute {attribute!r}"
raise AttributeError(msg)
Expand Down

0 comments on commit b612e0b

Please sign in to comment.