Skip to content

Commit a1c67f7

Browse files
committed
fix flake8 E501 - line too long
1 parent 0da1bf5 commit a1c67f7

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

OMPython/ModelicaSystem.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,8 @@ def getSimulationOptions(self, names: Optional[str | list[str]] = None) -> dict[
916916
917917
Examples:
918918
>>> mod.getSimulationOptions()
919-
{'startTime': '0', 'stopTime': '1.234', 'stepSize': '0.002', 'tolerance': '1.1e-08', 'solver': 'dassl', 'outputFormat': 'mat'}
919+
{'startTime': '0', 'stopTime': '1.234',
920+
'stepSize': '0.002', 'tolerance': '1.1e-08', 'solver': 'dassl', 'outputFormat': 'mat'}
920921
>>> mod.getSimulationOptions("stopTime")
921922
['1.234']
922923
>>> mod.getSimulationOptions(["tolerance", "stopTime"])
@@ -1099,8 +1100,10 @@ def simulate(
10991100
Examples:
11001101
mod.simulate()
11011102
mod.simulate(resultfile="a.mat")
1102-
mod.simulate(simflags="-noEventEmit -noRestart -override=e=0.3,g=10") # set runtime simulation flags, deprecated
1103-
mod.simulate(simargs={"noEventEmit": None, "noRestart": None, "override": "override": {"e": 0.3, "g": 10}}) # using simargs
1103+
# set runtime simulation flags, deprecated
1104+
mod.simulate(simflags="-noEventEmit -noRestart -override=e=0.3,g=10")
1105+
# using simargs
1106+
mod.simulate(simargs={"noEventEmit": None, "noRestart": None, "override": "override": {"e": 0.3, "g": 10}})
11041107
"""
11051108

11061109
if resultfile is None:
@@ -1385,7 +1388,8 @@ def setSimulationOptions(
13851388
) -> bool:
13861389
"""
13871390
This method is used to set simulation options. It can be called:
1388-
with a sequence of simulation options name and assigning corresponding values as arguments as show in the example below:
1391+
with a sequence of simulation options name and assigning corresponding values as arguments as show in the
1392+
example below:
13891393
usage
13901394
>>> setSimulationOptions("Name=value") # depreciated
13911395
>>> setSimulationOptions(["Name1=value1","Name2=value2"]) # depreciated
@@ -1409,7 +1413,8 @@ def setLinearizationOptions(
14091413
) -> bool:
14101414
"""
14111415
This method is used to set linearization options. It can be called:
1412-
with a sequence of linearization options name and assigning corresponding value as arguments as show in the example below
1416+
with a sequence of linearization options name and assigning corresponding value as arguments as show in the
1417+
example below
14131418
usage
14141419
>>> setLinearizationOptions("Name=value") # depreciated
14151420
>>> setLinearizationOptions(["Name1=value1","Name2=value2"]) # depreciated
@@ -1433,7 +1438,8 @@ def setOptimizationOptions(
14331438
) -> bool:
14341439
"""
14351440
This method is used to set optimization options. It can be called:
1436-
with a sequence of optimization options name and assigning corresponding values as arguments as show in the example below:
1441+
with a sequence of optimization options name and assigning corresponding values as arguments as show in the
1442+
example below:
14371443
usage
14381444
>>> setOptimizationOptions("Name=value") # depreciated
14391445
>>> setOptimizationOptions(["Name1=value1","Name2=value2"]) # depreciated
@@ -1573,7 +1579,8 @@ def convertMo2Fmu(self, version: str = "2.0", fmuType: str = "me_cs",
15731579
Examples:
15741580
>>> mod.convertMo2Fmu()
15751581
'/tmp/tmpmhfx9umo/CauerLowPassAnalog.fmu'
1576-
>>> mod.convertMo2Fmu(version="2.0", fmuType="me|cs|me_cs", fileNamePrefix="<default>", includeResources=True)
1582+
>>> mod.convertMo2Fmu(version="2.0", fmuType="me|cs|me_cs", fileNamePrefix="<default>",
1583+
includeResources=True)
15771584
'/tmp/tmpmhfx9umo/CauerLowPassAnalog.fmu'
15781585
"""
15791586

@@ -1596,7 +1603,8 @@ def convertMo2Fmu(self, version: str = "2.0", fmuType: str = "me_cs",
15961603
# to convert FMU to Modelica model
15971604
def convertFmu2Mo(self, fmuName): # 20
15981605
"""
1599-
In order to load FMU, at first it needs to be translated into Modelica model. This method is used to generate Modelica model from the given FMU. It generates "fmuName_me_FMU.mo".
1606+
In order to load FMU, at first it needs to be translated into Modelica model. This method is used to generate
1607+
Modelica model from the given FMU. It generates "fmuName_me_FMU.mo".
16001608
Currently, it only supports Model Exchange conversion.
16011609
usage
16021610
>>> convertFmu2Mo("c:/BouncingBall.Fmu")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ Issues = "https://github.com/OpenModelica/OMPython/issues"
3434
Download = "https://pypi.org/project/OMPython/#files"
3535

3636
[tool.flake8]
37+
max-line-length = 120
3738
extend-ignore = [
38-
'E501', # line too long
3939
]

0 commit comments

Comments
 (0)