Skip to content

Commit

Permalink
chore(deps): update dependency ruff to v0.4.2 (#3533)
Browse files Browse the repository at this point in the history
Co-authored-by: Hayden <[email protected]>
  • Loading branch information
michael-genson and hay-kot authored May 1, 2024
1 parent f697a7e commit cca11b5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ repos:
exclude: ^tests/data/
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.5
rev: v0.4.2
hooks:
- id: ruff-format
4 changes: 2 additions & 2 deletions mealie/db/models/_model_utils/guid.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def convert_value_to_guid(value: Any, dialect: Dialect) -> str | None:
return str(value)
else:
if not isinstance(value, uuid.UUID):
return "%.32x" % uuid.UUID(value).int
return f"{uuid.UUID(value).int:032x}"
else:
# hexstring
return "%.32x" % value.int
return f"{value.int:032x}"

def load_dialect_impl(self, dialect):
if dialect.name == "postgresql":
Expand Down
8 changes: 4 additions & 4 deletions mealie/services/parser_services/crfpp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def getFeatures(token, index, tokens):
length = len(tokens)

return [
("I%s" % index),
("L%s" % lengthGroup(length)),
("Yes" if isCapitalized(token) else "No") + "CAP",
("Yes" if insideParenthesis(token, tokens) else "No") + "PAREN",
f"I{index}",
f"L{lengthGroup(length)}",
f"{'Yes' if isCapitalized(token) else 'No'}CAP",
f"{'Yes' if insideParenthesis(token, tokens) else 'No'}PAREN",
]


Expand Down
36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cca11b5

Please sign in to comment.