jonescompneurolab / hnn-core

Simulation and optimization of neural circuits for MEG/EEG source estimates
https://jonescompneurolab.github.io/hnn-core/
BSD 3-Clause "New" or "Revised" License
50 stars 50 forks source link

[MRG] Fix flake8 errors and warnings #779

Open gtdang opened 1 month ago

gtdang commented 1 month ago

Fixed any flake8 warning/errors in the codebase. These errors are likely legacy errors that were in the codebase before flake8 gh action checks were fully implemented.

Collaborators can encounter flake8 warnings/errors if they submit a PR in which legacy errors exist in the file they edited. These errors may not be relevant to their PRs.

rythorpe commented 1 month ago

Hmm, this is curious. I'm guessing the root cause of the emergent flake8 errors is actually due to updates in flake8 or Python itself. We (maybe just me?) used to run flake8 tests locally from the hnn-core/hnn_core directory before finally installing the VSCode plugin, and none of these errors popped up then. Regardless, thanks for digging into this @gtdang!

jasmainak commented 1 month ago

Thanks for digging @gtdang ... I agree with @rythorpe that it seems flake8 may have added new rules. Can you check if other repos are following these new rules? E.g., mne-python, numpy, sklearn ... we could add some of the more pedantic rules in the ignores list, specially if they make the code less readable