Skip to content

Refactor: Replace bare 'except:' with 'except Exception:' to fix E722#886

Merged
vvbragin merged 1 commit intosuny-downstate-medical-center:developmentfrom
PratapShashwat:fix-bare-excepts
Feb 18, 2026
Merged

Refactor: Replace bare 'except:' with 'except Exception:' to fix E722#886
vvbragin merged 1 commit intosuny-downstate-medical-center:developmentfrom
PratapShashwat:fix-bare-excepts

Conversation

@PratapShashwat
Copy link
Copy Markdown
Contributor

Description
Replaced bare except: clauses with except Exception: in netpyne/specs/netParams.py.

Reasoning
Bare exceptions (except:) catch SystemExit and KeyboardInterrupt, which makes it difficult to stop the program during execution. except Exception: catches all standard program errors but respects system signals (PEP8 E722).

Verification

  • Ran flake8 to confirm E722 is resolved.
  • Verified via test script that basic functionality remains intact.

@vvbragin
Copy link
Copy Markdown
Collaborator

thanks, @PratapShashwat! merged

@vvbragin vvbragin merged commit c9bf240 into suny-downstate-medical-center:development Feb 18, 2026
4 of 8 checks passed
@PratapShashwat
Copy link
Copy Markdown
Contributor Author

@vvbragin Hi Valery, thank you for reviewing and merging this!

I am very interested in continuing to contribute to NetPyNE for GSoC 2026. I noticed the INCF ideas list is currently undergoing revisions and NetPyNE isn't listed at the moment. Are there plans for NetPyNE to participate this year?

I have a background in running ML models on supercomputing clusters and managing SLURM workflows, and I saw a previous NetPyNE project focused on ML/AI Parameter Tuning and the batch subpackage. I would love to tackle an issue in that domain or even submit a proposal for it if INCF is accepting independent ideas.

Let me know if there's a better place to discuss this!

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