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

[pre-commit.ci] pre-commit autoupdate #413

Merged
merged 3 commits into from
Aug 27, 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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.9
rev: v0.6.2
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.5.0
rev: v9.9.1
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
Expand Down
2 changes: 1 addition & 1 deletion backend/src/app/core/data/crud/object_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def create(self, db: Session, *, create_dto: ObjectHandleCreate) -> ObjectHandle
return super().create(db=db, create_dto=create_dto)
except IntegrityError as e:
# Flo: return existing OH when UC constraint fails
if type(e.orig) == UniqueViolation:
if isinstance(e.orig, UniqueViolation):
db.close() # Flo: close the session because we have to start a new transaction
with SQLService().db_session() as sess:
for obj_id_key, obj_id_val in create_dto.model_dump().items():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# global config
__conf_file__ = os.getenv("RAY_CONFIG", "./config.yaml")
conf = OmegaConf.load(__conf_file__)
assert type(conf) == DictConfig
assert isinstance(conf, DictConfig), f"Cannot load Ray Config from {__conf_file__}"

logger.info(f"Loaded config '{__conf_file__}'")

Expand Down
Loading