Closed OnnoEbbens closed 11 months ago
Thanks for the review Bas! Do you have time to look at some of the Codacy issues (the one failing test)? There are about 50 new issues and most of them can be solved easily.
I think we should just use our admin powers to ignore issues on codacy, or somehow add some of the issues it raises to the ignore list. Most of them aren't really an issue or worth fixing.
Has #261 been fixed yet? It would be good to get that one done before this release I think.
I fixed most of the codacy errors. Some ideas/remarks/questions:
too_complex
pattern and the too_many_branches
patterns because that are often hard to solve. However I think the checks are good indicators of code that is hard to read so I feel conflicted about disabling them.dcs.py
, geotop.py
and regis.py
. I think we should enforce docstrings.{}
is preferred over dict()
according to the codacy style checker. I already fixed this but I think it is good to know for future commits.pass
with ...
:
nlmod/util.py
Medium icon Medium Code Style
Unnecessary pass statement
pass
- @dbrakenhoff: can you check this codacy error, I cannot figure out if we can ignore this:
nlmod/dims/base.py Minor icon Minor Code Style bad operand type for unary ~: NoneType (invalid-unary-operand-type)
data[lay, mask] = data[lay, ~mask][i]
- @dbrakenhoff: probably the same as the previous one:
nlmod/dims/base.py Minor icon Minor Code Style bad operand type for unary ~: NoneType (invalid-unary-operand-type)
data[mask] = data[~mask, i]
- @rubencalje: can you check this codacy error (and add a docstring for the `dataframe_to_flopy_timeseries` function?):
nlmod/dims/time.py Minor icon Minor Code Style Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
def dataframe_to_flopy_timeseries(
- @rubencalje: can you check this codacy error? Should we add skimage as a dependency?
nlmod/read/rws.py Minor icon Minor Code Style Import outside toplevel (skimage.morphology.reconstruction) (import-outside-toplevel)
from skimage.morphology import reconstruction
Suddenly a new check: too-many_statements
appeared. I decided to ignore that one
The ~ issues can be ignored. I'm not sure how to avoid the check being triggered for these cases.
Great progress!