Skip to content

Commit

Permalink
Update linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Jan 18, 2024
1 parent f798144 commit b55d8bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions mb/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def acquire_token(form_data: OAuth2PasswordRequestForm = Depends()):

@app.get('/whoami', tags=['account'], response_model=UserInformation)
async def retrieve_myself(user: User = Depends(is_active)):
return UserInformation(**user.model_dump())
return UserInformation(**user.dict())


async def async_task(task_id: UUID):
Expand Down Expand Up @@ -137,7 +137,7 @@ async def download_single_random_waveform(normalised: bool = False):
interval, record = result.to_waveform(normalised=normalised, unit='cm/s/s')
# noinspection PyTypeChecker
return RecordResponse(
**result.model_dump(),
**result.dict(),
endpoint='/waveform/jackpot',
time_interval=interval,
waveform=record.tolist())
Expand All @@ -153,7 +153,7 @@ async def download_single_random_spectrum():
frequency, record = result.to_spectrum()
# noinspection PyTypeChecker
return RecordResponse(
**result.model_dump(),
**result.dict(),
endpoint='/spectrum/jackpot',
frequency_interval=frequency,
spectrum=record.tolist())
Expand Down
2 changes: 1 addition & 1 deletion mb/app/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def processing_record(result: Record, process_config: ProcessConfig):
detail='Low cut frequency should be smaller than high cut frequency.')

record = ProcessedResponse(
**result.model_dump(),
**result.dict(),
endpoint='/process',
process_config=process_config)

Expand Down
2 changes: 1 addition & 1 deletion mb/app/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from datetime import datetime
from uuid import UUID

from pydantic import BaseModel, Field
from pydantic.v1 import BaseModel, Field

from mb.record.utility import filter_regex, window_regex

Expand Down
2 changes: 1 addition & 1 deletion mb/app/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# noinspection PyPackageRequirements
from jose import JWTError, jwt
from passlib.context import CryptContext
from pydantic import BaseModel, Field
from pydantic.v1 import BaseModel, Field


class CredentialException(HTTPException):
Expand Down

0 comments on commit b55d8bd

Please sign in to comment.