mypy check previously excluded folders#2787
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #2787 +/- ##
========================================
Coverage 71.98% 71.98%
========================================
Files 351 351
Lines 37424 37433 +9
========================================
+ Hits 26939 26946 +7
- Misses 10485 10487 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| from pandapower.control.controller.DERController import PQVArea4120V1, PQVArea4120V2, PQVArea4120V3 | ||
|
|
||
| pq_area = PQVArea4120V1() | ||
| plot_pq_area(pq_area, "PQVArea4120V1") |
There was a problem hiding this comment.
plot_pq_area has the signature def plot_pq_area(pq_area, **kwargs):, thus, it cannot have a second positional argument
| return self._interpolator | ||
|
|
||
| @interpolator.getter | ||
| @interpolator.getter # type: ignore[misc] |
There was a problem hiding this comment.
Above interpolator is defined as property here the getter is directly afterwards overwritten.
Additionally, this method returns something; is this a typo and it should be the setter instead?
| from pandapower import __version__ as pp_version | ||
| from pandapower.control.controller.trafo import DiscreteTapControl | ||
| from pandapower.control.util.auxiliary import create_trafo_characteristics | ||
| from pandapower.control.util.auxiliary import _create_trafo_characteristics | ||
| from pandapower.file_io import to_json | ||
| from pandapower.networks.create_examples import example_multivoltage | ||
| from pandapower.run import runpp | ||
|
|
||
| net = example_multivoltage() | ||
| DiscreteTapControl(net, 1, 1.02, 1.03) | ||
| create_trafo_characteristics(net, "trafo", 1, "vk_percent", [-2, 0, 2], [3.5, 4, 4.5]) | ||
| DiscreteTapControl.DiscreteTapControl(net, 1, 1.02, 1.03) | ||
| _create_trafo_characteristics(net, "trafo", 1, "vk_percent", [-2, 0, 2], [3.5, 4, 4.5]) | ||
| runpp(net, run_control=True) | ||
| to_json(net, os.path.join("old_versions", "example_%s.json" % pp_version)) |
There was a problem hiding this comment.
Is this code used at all?
It seems like it had some errors...
| trafo_dict = {} | ||
| trafo3w_dict = {} | ||
| impedance_dict = {} | ||
| impedance_dict = {} # type: ignore[name-defined] |
There was a problem hiding this comment.
impedance_dict is not a global variable even though it is a global variable.
Should I create a gloabal variable for that?
|
The PR is ready for review. I left some comments, some act just as an information others point to potential bugs. |
|
# Conflicts: # pandapower/plotting/collections.py
|



Check typing of previously excluded folders with mypy