Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy error in py3.12 #372

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Fix mypy error in py3.12 #372

merged 1 commit into from
Dec 18, 2024

Conversation

niksirbi
Copy link
Member

@niksirbi niksirbi commented Dec 18, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

mypy was complaining on CI, see this failure.

This started happening after neuroinformatics-unit/actions#71 was merged and a new NIU actions release was made. Basically, mypy now runs on Python 3.12 instead of 3.10, so it sees some additional errors (in our case, just 1 error). I was able to reproduce the error in a Python 3.12 environment locally.

What does this PR do?

It fixed the issue mypy was complaining about, by ensuring that time_coords doesn't undergo a type change.

References

neuroinformatics-unit/actions#71

How has this PR been tested?

Locally running pre-commit and pytest.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • [n/a] Tests have been added to cover all new functionality
  • [n/a] The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.79%. Comparing base (1f3ec8c) to head (cd133e7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #372   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files          14       14           
  Lines         969      969           
=======================================
  Hits          967      967           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niksirbi niksirbi marked this pull request as ready for review December 18, 2024 15:02
@niksirbi niksirbi requested a review from adamltyson December 18, 2024 15:02
@adamltyson adamltyson added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit aac61b0 Dec 18, 2024
28 checks passed
@niksirbi niksirbi deleted the fix-mypy-error branch December 19, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants