Skip to content

Commit

Permalink
Reformat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Dec 11, 2023
1 parent 0f2bbaa commit c84a7ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/chanjo2/endpoints/intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def count_nr_filters(filters: List[str]) -> int:

@router.post("/intervals/load/genes/{build}")
async def load_genes(
build: Builds,
file_path: Optional[str] = None,
session: Session = Depends(get_session),
build: Builds,
file_path: Optional[str] = None,
session: Session = Depends(get_session),
) -> Response:
"""Load genes in the given genome build."""

Expand All @@ -62,7 +62,7 @@ async def load_genes(

@router.post("/intervals/genes")
async def genes(
query: GeneQuery, session: Session = Depends(get_session)
query: GeneQuery, session: Session = Depends(get_session)
) -> List[Gene]:
"""Return genes according to query parameters."""
nr_filters = count_nr_filters(
Expand All @@ -86,9 +86,9 @@ async def genes(

@router.post("/intervals/load/transcripts/{build}")
async def load_transcripts(
build: Builds,
file_path: Optional[str] = None,
session: Session = Depends(get_session),
build: Builds,
file_path: Optional[str] = None,
session: Session = Depends(get_session),
) -> Response:
"""Load transcripts in the given genome build."""

Expand Down Expand Up @@ -117,7 +117,7 @@ async def load_transcripts(

@router.post("/intervals/transcripts")
async def transcripts(
query: GeneIntervalQuery, session: Session = Depends(get_session)
query: GeneIntervalQuery, session: Session = Depends(get_session)
) -> List[Transcript]:
"""Return transcripts according to query parameters."""
nr_filters = count_nr_filters(
Expand Down Expand Up @@ -147,9 +147,9 @@ async def transcripts(

@router.post("/intervals/load/exons/{build}")
async def load_exons(
build: Builds,
file_path: Optional[str] = None,
session: Session = Depends(get_session),
build: Builds,
file_path: Optional[str] = None,
session: Session = Depends(get_session),
) -> Response:
"""Load exons in the given genome build."""

Expand All @@ -174,7 +174,7 @@ async def load_exons(

@router.post("/intervals/exons")
async def exons(
query: GeneIntervalQuery, session: Session = Depends(get_session)
query: GeneIntervalQuery, session: Session = Depends(get_session)
) -> List[Exon]:
"""Return exons in the given genome build."""
nr_filters = count_nr_filters(
Expand Down
4 changes: 2 additions & 2 deletions src/chanjo2/models/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class SampleGeneIntervalQuery(BaseModel):
samples: Optional[List[str]]
case: Optional[str]

model_validator(mode='before')
model_validator(mode="before")

def check_genes_lists(cls, values):
nr_provided_gene_lists: int = 0
Expand All @@ -201,7 +201,7 @@ def check_genes_lists(cls, values):
raise ValueError(MULTIPLE_GENE_LISTS_NOT_SUPPORTED_MSG)
return values

model_validator(mode='before')
model_validator(mode="before")

def check_sample_input(cls, values):
case = values.get("case", "") != ""
Expand Down

0 comments on commit c84a7ba

Please sign in to comment.