brainglobe / brainglobe-heatmap

Rendering anatomical heatmaps with brainrender and matplotlib
https://brainglobe.info
MIT License
34 stars 10 forks source link

small fixes following #21 #26

Closed carlocastoldi closed 9 months ago

carlocastoldi commented 9 months ago

This PR:

Additionally I changed Plane.from_norm() typing to return a Self type instead of a vd.Plane because, well, that's what it returns. If this is a problem because typing.Self is not in previous python version, I can just remove the type hinting

adamltyson commented 9 months ago

Hi @carlocastoldi, thanks for this PR!

We're currently supporting Python 3.9, 3.10 & 3.11, so unfortunately we can't use any functionality that's only available in newer versions. mypy is also complaining with:

brainglobe_heatmap/plane.py:1: error: Module "typing" has no attribute "Self"  [attr-defined]
brainglobe_heatmap/plane.py:1: note: Use `from typing_extensions import Self` instead
brainglobe_heatmap/plane.py:1: note: See https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
Found 1 error in 1 file (checked 17 source files)

Would you mind fixing (or removing) the typing, then I'll review.

codecov[bot] commented 9 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella: