Skip to content

Commit 96245fb

Browse files
Remove unnecessary parentheses after keyword (#33)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
1 parent b9cd447 commit 96245fb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/StateMachine.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __CheckConditions(self, conditions):
3838
all_conditions_satisfied: a boolean that indicates if all conditions are satisfied
3939
"""
4040
all_conditions_satisfied = True
41-
if(conditions is not None):
41+
if conditions is not None:
4242
_conditions = conditions.conditions_list
4343
for condition in _conditions:
4444
module, expression = self.__PrepareExpression(
@@ -76,7 +76,7 @@ def __ExecActions(self, actions):
7676
all_action_executed: a boolean that indicates if all actions are executed
7777
"""
7878
all_action_executed = True
79-
if(actions is not None):
79+
if actions is not None:
8080
_actions = actions.actions_list
8181
for action in _actions:
8282
module, expression = self.__PrepareExpression(
@@ -138,7 +138,7 @@ def LoadStateMachine(self):
138138
"""
139139
This Function load state machine configuration
140140
"""
141-
if (self.states is not None):
141+
if self.states is not None:
142142
logging.error("State Machine already loaded")
143143
else:
144144
self.states, self.current_state = ReadStateMachineFile(
@@ -171,12 +171,12 @@ def InjectEvent(self, event: str):
171171
# Preconditions
172172
all_pre_conditions_satisfied = self.__CheckConditions(
173173
handled_event.pre_conditions)
174-
if(all_pre_conditions_satisfied):
174+
if all_pre_conditions_satisfied:
175175
logging.debug("PreConditions satisfied")
176176
# Preactions
177177
all_pre_actions_executed = self.__ExecActions(
178178
handled_event.pre_actions)
179-
if(all_pre_actions_executed):
179+
if all_pre_actions_executed:
180180
logging.debug("PreActions Executed")
181181
# Transition
182182
logging.debug("Transition %s ------> %s",
@@ -185,12 +185,12 @@ def InjectEvent(self, event: str):
185185
# Postactions
186186
all_post_actions_executed = self.__ExecActions(
187187
handled_event.post_actions)
188-
if(all_post_actions_executed):
188+
if all_post_actions_executed:
189189
logging.debug("PostActions Executed")
190190
# Postconditions
191191
all_post_conditions_satisfied = self.__CheckConditions(
192192
handled_event.post_conditions)
193-
if(all_post_conditions_satisfied):
193+
if all_post_conditions_satisfied:
194194
logging.debug("PostConditions Satisfied")
195195
else:
196196
logging.error(

0 commit comments

Comments
 (0)