Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2024
1 parent 3375a8a commit dc1eb6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
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 @@ -1044,9 +1044,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 @@ -1381,9 +1381,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 dc1eb6e

Please sign in to comment.