Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorStoneAstro committed Aug 8, 2024
2 parents f72d8ad + dad9ed2 commit 6c4585b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: "24.4.2"
rev: "24.8.0"
hooks:
- id: black-jupyter

Expand Down Expand Up @@ -51,13 +51,13 @@ repos:
args: [--prose-wrap=always]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.0"
rev: "v0.5.6"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.1"
rev: "v1.11.1"
hooks:
- id: mypy
files: src
Expand Down
2 changes: 1 addition & 1 deletion src/caustics/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _init_kwargs_field_check(cls, v, info: ValidationInfo):
field_name = info.field_name
field = cls.model_fields[field_name]
anno_args = typing.get_args(field.annotation)
if len(anno_args) == 2 and anno_args[1] == type(None):
if len(anno_args) == 2 and anno_args[1] is type(None):
# This means that the anno is optional
expected_type = next(
filter(lambda x: x is not None, typing.get_args(field.annotation))
Expand Down

0 comments on commit 6c4585b

Please sign in to comment.