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 #219

Merged
merged 2 commits into from
Feb 7, 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
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 @@ -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
Loading