Skip to content

Commit

Permalink
Fix flake8 preference for warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Sep 10, 2023
1 parent f254dd2 commit 9513218
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions swcc/swcc/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import json
from pathlib import Path
from tempfile import TemporaryDirectory
import warnings

import requests
import warnings

try:
from typing import Any, Dict, Iterator, Literal, Optional, Union
Expand Down Expand Up @@ -114,7 +114,10 @@ def interpret_data(self, input_data):
if prefix in required_key_prefixes:
objects_by_domain[anatomy_id] = {}
else:
warnings.warn(f'No shape exists for {anatomy_id}. Cannot create {key}.')
warnings.warn(
f'No shape exists for {anatomy_id}. Cannot create {key}.',
stacklevel=2,
)
continue
objects_by_domain[anatomy_id][prefix] = (
entry[key].replace('../', '').replace('./', '')
Expand Down

0 comments on commit 9513218

Please sign in to comment.