Skip to content

Ci/real linting#316

Draft
sneakers-the-rat wants to merge 5 commits into
miniscope:modernize-minianfrom
sneakers-the-rat:ci/real-linting
Draft

Ci/real linting#316
sneakers-the-rat wants to merge 5 commits into
miniscope:modernize-minianfrom
sneakers-the-rat:ci/real-linting

Conversation

@sneakers-the-rat
Copy link
Copy Markdown
Contributor

Fix: #311

as #311 says - we didn't actually have linting/formatting enabled, just pyupgrade, so this is working us towards that.

there are a lot of things to fix in rules that i think we definitely need to have enabled, most notably for annotations which can only be kinda sorta inferred automatically, and oh boy the code here has some twists and turns with all these local closures and callbacks and whatnot.

it's good for us to be forced to take our medicine though! function annotations make the code much easier to work with, and who knows we might eventually get to a point where we can use mypy and numpydantic's type annotations to make the array passing a little less mysterious.

opening as a draft after just working through the visualization module, will come back to this another day, likely after we merge down the existing PRs.

current outstanding fixes to do are like this:

134     ANN001  missing-type-function-argument
 14     F405    undefined-local-with-import-star-usage
 13     NPY002  numpy-legacy-random
 12     ANN003  missing-type-kwargs
 12     ANN201  missing-return-type-undocumented-public-function
  6     ANN202  missing-return-type-private-function
  6     E722    bare-except
  4     ARG001  unused-function-argument
  4     S101    assert
  2     ARG002  unused-method-argument
  2     S110    try-except-pass
  1     B007    unused-loop-control-variable
  1     B904    raise-without-from-inside-except
  1     S113    request-without-timeout
  1     SIM108  if-else-block-instead-of-if-exp

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 5.71429% with 231 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
minian/visualization.py 0.00% 135 Missing ⚠️
minian/utilities.py 28.57% 30 Missing ⚠️
minian/cnmf.py 0.00% 27 Missing ⚠️
minian/motion_correction.py 0.00% 20 Missing ⚠️
minian/cross_registration.py 0.00% 7 Missing ⚠️
minian/initialization.py 0.00% 6 Missing ⚠️
minian/install.py 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant