ansys / ansys/pyansys-tools-variableinterop

Exceptions should not derive from BaseException

Open
#145 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Per [PEP 8](https://peps.python.org/pep-0008/#programming-recommendations), "Derive exceptions from `Exception` rather than `BaseException`. Direct inheritance from `BaseException` is reserved for exceptions where catching them is almost always the wrong thing to do."

https://github.com/ansys/pyansys-tools-variableinterop/blob/9356b9d453ec26872fa823c9bd971cfa4d3a9441/src/ansys/tools/variableinterop/exceptions.py#L51

https://github.com/ansys/pyansys-tools-variableinterop/blob/9356b9d453ec26872fa823c9bd971cfa4d3a9441/src/ansys/tools/variableinterop/exceptions.py#L89

Contributor guide

Open the contributing guide

Research direction

Open src/ansys/tools/variableinterop/exceptions.py and inspect the two exception definitions at the referenced lines. Update their inheritance as requested, then run the existing project tests to confirm exception behavior remains intact; done means neither exception directly derives from BaseException.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.