fix: Python 3 correctness and PEP 8 compliance improvements by shbhmexe · Pull Request #2640 · su2code/SU2

@shbhmexe

- Use identity operators for None comparisons (is/is not)
- Replace bare except with Exception/OSError
- Replace .has_key() and .iteritems() with Python 3 equivalents
- Fix mutable default arguments in function signatures

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>

github-advanced-security[bot]

bot found potential problems Dec 8, 2025

@shbhmexe

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>

github-advanced-security[bot]

pcarruscag

@shbhmexe

github-advanced-security[bot]

shbhmexe added 2 commits

December 9, 2025 15:01
….projection

- tools.py: update restart2solution docstring to match signature (state=None), per review.
- projection.py: clarify that the 'state' parameter is accepted for API compatibility and currently unused.
- No functional changes.

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
…odeQL/CodeFactor)

- Replace three `try/except ...: pass` blocks with existence checks before os.remove.
- No behavioral change; resolves “Unreachable except block” and “Empty except” findings.

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>

pcarruscag