Skip to content

Commit

Permalink
remove complicated issue
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Nov 15, 2024
1 parent 15b952e commit eba9c45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/neuroconv/tools/nwb_helpers/_metadata_and_file_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from datetime import datetime
from pathlib import Path
from typing import Literal, Optional
from warnings import warn

from hdmf_zarr import NWBZarrIO
from pydantic import FilePath
Expand All @@ -26,7 +25,7 @@ def get_module(nwbfile: NWBFile, name: str, description: str = None):
"""Check if processing module exists. If not, create it. Then return module."""
if name in nwbfile.processing:
if description is not None and nwbfile.processing[name].description != description:
warn(
warnings.warn(
"Custom description given to get_module does not match existing module description! "
"Ignoring custom description."
)
Expand Down Expand Up @@ -157,7 +156,7 @@ def _attempt_cleanup_of_existing_nwbfile(nwbfile_path: Path) -> None:
# Windows in particular can encounter errors at this step
except PermissionError: # pragma: no cover
message = f"Unable to remove NWB file located at {nwbfile_path.absolute()}! Please remove it manually."
warn(message=message, stacklevel=2)
warnings.warn(message=message, stacklevel=2)


@contextmanager
Expand Down
4 changes: 0 additions & 4 deletions src/neuroconv/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,3 @@ def __getattr__(name):
warn(message=message, category=DeprecationWarning, stacklevel=2)

return Optional[DirectoryPath]

if name in globals():
return globals()[name]
raise ImportError(f"cannot import name '{name}' from '{__name__}'")

0 comments on commit eba9c45

Please sign in to comment.