Skip to content

Commit

Permalink
Merge pull request #219 from dandi/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
yarikoptic authored Feb 7, 2024
2 parents d8213bb + ab58ab8 commit 08d92c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
Expand Down
6 changes: 3 additions & 3 deletions dandischema/digests/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def add_directory_checksums(self, checksums: List[ZarrChecksum]) -> None:
"""Add a list of directory checksums to the listing."""
for new_checksum in checksums:
try:
self.directories[
self._index(self.directories, new_checksum)
] = new_checksum
self.directories[self._index(self.directories, new_checksum)] = (
new_checksum
)
except ValueError:
self.directories.append(new_checksum)
self.directories = sorted(self.directories)
Expand Down
14 changes: 8 additions & 6 deletions dandischema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,9 +1045,9 @@ class Activity(DandiBaseModel):

# isPartOf: Optional["Activity"] = Field(None, json_schema_extra={"nskey": "schema"})
# hasPart: Optional["Activity"] = Field(None, json_schema_extra={"nskey": "schema"})
wasAssociatedWith: Optional[
List[Union[Person, Organization, Software, Agent]]
] = Field(None, json_schema_extra={"nskey": "prov"})
wasAssociatedWith: Optional[List[Union[Person, Organization, Software, Agent]]] = (
Field(None, json_schema_extra={"nskey": "prov"})
)
used: Optional[List[Equipment]] = Field(
None,
description="A listing of equipment used for the activity.",
Expand Down Expand Up @@ -1382,9 +1382,11 @@ class CommonModel(DandiBaseModel):
repository: Optional[AnyHttpUrl] = Field(
# mypy doesn't like using a string as the default for an AnyHttpUrl
# attribute, so we have to convert it to an AnyHttpUrl:
TypeAdapter(AnyHttpUrl).validate_python(DANDI_INSTANCE_URL)
if DANDI_INSTANCE_URL is not None
else None,
(
TypeAdapter(AnyHttpUrl).validate_python(DANDI_INSTANCE_URL)
if DANDI_INSTANCE_URL is not None
else None
),
description="location of the item",
json_schema_extra={"nskey": "dandi", "readOnly": True},
)
Expand Down

0 comments on commit 08d92c8

Please sign in to comment.