Removes param = self.param to use self.param directly #4494
Removes param = self.param to use self.param directly #4494kratman merged 6 commits intopybamm-team:developfrom
param = self.param to use self.param directly #4494Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4494 +/- ##
===========================================
- Coverage 99.42% 99.42% -0.01%
===========================================
Files 299 299
Lines 22739 22679 -60
===========================================
- Hits 22608 22548 -60
Misses 131 131 ☔ View full report in Codecov by Sentry. |
|
I think this change makes the code harder to read |
For reference, see discussion in #4484 |
src/pybamm/models/full_battery_models/lithium_ion/electrode_soh.py
Outdated
Show resolved
Hide resolved
src/pybamm/models/submodels/interface/kinetics/diffusion_limited.py
Outdated
Show resolved
Hide resolved
kratman
left a comment
There was a problem hiding this comment.
Looks good now.
To address the readability concerns from this change, I think the best approach is that we should move towards breaking up the long functions into much smaller ones. That way we can be clear that we are using class memory while also making the code easier to read. This is outside the scope of this PR though
…m#4494) * 3 files done * all occurances changed * added changelog and fixed spectral_volume issue * fixed docs --------- Co-authored-by: Eric G. Kratz <kratman@users.noreply.github.com>
Description
Used regex accompanied with some manual checking and have removed
param = self.paramand have modified the code to useself.paramdirectly.Fixes #4484
Type of change
Key checklist:
$ pre-commit run(or$ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all(or$ nox -s tests)$ python run-tests.py --doctest(or$ nox -s doctests)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick(or$ nox -s quick).Further checks: