Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
  • Loading branch information
EtienneLt committed Mar 4, 2024
1 parent e9681c2 commit e286752
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pypowsybl/shortcircuit/impl/short_circuit_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ class ShortCircuitAnalysis:
def __init__(self, handle: _pypowsybl.JavaHandle):
self._handle = handle

def set_branch_fault(self, id: str, element_id: str, r: float = None, x: float = None, proportional_location: float = None):
self.set_faults(id=id, element_id=element_id, r=r, x=x, proportional_location=proportional_location, fault_type='BRANCH_FAULT')
def set_branch_fault(self, branch_id: ArrayLike, element_id: str, r: ArrayLike, x: ArrayLike,
proportional_location: ArrayLike) -> None:
self.set_faults(id=branch_id, element_id=element_id, r=r, x=x,
proportional_location=proportional_location, fault_type='BRANCH_FAULT')

def set_bus_fault(self, id: str, element_id: str, r: float = None, x: float = None):
self.set_faults(id=id, element_id=element_id, r=r, x=x, fault_type='BUS_FAULT')
def set_bus_fault(self, bus_id: str, element_id: str, r: ArrayLike, x: ArrayLike) -> None:
self.set_faults(id=bus_id, element_id=element_id, r=r, x=x, fault_type='BUS_FAULT')

def _set_faults(self, dfs: List[Optional[DataFrame]], **kwargs: ArrayLike) -> None:
metadata = _pypowsybl.get_faults_dataframes_metadata()
Expand Down

0 comments on commit e286752

Please sign in to comment.