This PR runs the ruff linting and formatting (which uses black) across the DRP. Where it couldn't apply automatic fixes, I tried to resolve all the linting errors as best I could. The linting errors fell into the following categories:
use of from x import * - I tried to resolve these as best I could.
use of bare except: in try block - I changed these to except Exception: to catch generally but that shouldn't be done either. I wasn't sure what exception to catch on.
gmosMethod and vimosMethod - These modules don't seem used anymore. Some functions referenced in these do not exist.
lots of variable xxx is defined but unused, and variable xxx undefined - I commented out these lines to keep the original line, in case these should be in.
missing function definitions in core/fluxcal.py - these still need to be resolved. Not sure what to do here? See the Action error log. Looks like this is a straight IDL ports. Maybe missing functions?
I have turned on the ruff linting in the Github Action workflow, so it will run on every commit now. If it finds errors it will fail and they'll need to be resolved so the checks pass, before we can merge any PR.
@ajmejia you may want to do some spot checks to make sure I didn't mess anything up
This PR runs the
ruff
linting and formatting (which usesblack
) across the DRP. Where it couldn't apply automatic fixes, I tried to resolve all the linting errors as best I could. The linting errors fell into the following categories:from x import *
- I tried to resolve these as best I could.except:
intry
block - I changed these toexcept Exception:
to catch generally but that shouldn't be done either. I wasn't sure what exception to catch on.gmosMethod
andvimosMethod
- These modules don't seem used anymore. Some functions referenced in these do not exist.variable xxx is defined but unused
, andvariable xxx undefined
- I commented out these lines to keep the original line, in case these should be in.core/fluxcal.py
- these still need to be resolved. Not sure what to do here? See the Action error log. Looks like this is a straight IDL ports. Maybe missing functions?I have turned on the
ruff
linting in the Github Action workflow, so it will run on every commit now. If it finds errors it will fail and they'll need to be resolved so the checks pass, before we can merge any PR.@ajmejia you may want to do some spot checks to make sure I didn't mess anything up