Skip to content

Commit

Permalink
Merge pull request #1883 from dandi/ruff-update-fixes
Browse files Browse the repository at this point in the history
Add format changes from ruff update
  • Loading branch information
marySalvi authored Mar 4, 2024
2 parents 062cf3f + b74c3d2 commit a104687
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dandiapi/api/services/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def _build_validatable_version_metadata(version: Version) -> dict:
publishable_version = _build_publishable_version_from_draft(version)
metadata_for_validation = publishable_version.metadata

metadata_for_validation[
'id'
] = f'DANDI:{publishable_version.dandiset.identifier}/{publishable_version.version}'
metadata_for_validation['id'] = (
f'DANDI:{publishable_version.dandiset.identifier}/{publishable_version.version}'
)
metadata_for_validation['url'] = (
f'{settings.DANDI_WEB_APP_URL}/dandiset/'
f'{publishable_version.dandiset.identifier}/{publishable_version.version}'
Expand Down
1 change: 1 addition & 0 deletions dandiapi/api/tasks/scheduled.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This module is imported from celery.py in a post-app-load hook.
"""

from __future__ import annotations

from datetime import timedelta
Expand Down
12 changes: 6 additions & 6 deletions dandiapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def mutate_configuration(configuration: type[ComposedConfiguration]):
]

# Pagination
configuration.REST_FRAMEWORK[
'DEFAULT_PAGINATION_CLASS'
] = 'dandiapi.api.views.common.DandiPagination'
configuration.REST_FRAMEWORK['DEFAULT_PAGINATION_CLASS'] = (
'dandiapi.api.views.common.DandiPagination'
)

configuration.REST_FRAMEWORK[
'EXCEPTION_HANDLER'
] = 'dandiapi.drf_utils.rewrap_django_core_exceptions'
configuration.REST_FRAMEWORK['EXCEPTION_HANDLER'] = (
'dandiapi.drf_utils.rewrap_django_core_exceptions'
)

# If this environment variable is set, the pydantic model will allow URLs with localhost
# in them. This is important for development and testing environments, where URLs will
Expand Down
1 change: 1 addition & 0 deletions scripts/delete_from_versioned_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
You will need an AWS CLI profile set up with permission to delete objects from the desired bucket.
See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
"""

from __future__ import annotations

from concurrent.futures import ThreadPoolExecutor, as_completed
Expand Down
1 change: 1 addition & 0 deletions scripts/papertrail.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Script that will export all desired papertrail log files."""

from __future__ import annotations

from datetime import datetime
Expand Down

0 comments on commit a104687

Please sign in to comment.