Commit b043acc6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix typos and cosmetic changes only.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30645 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 807be83c
...@@ -39,7 +39,7 @@ def _compare(tester_list, prevision_movement, decision_movement): ...@@ -39,7 +39,7 @@ def _compare(tester_list, prevision_movement, decision_movement):
class RuleMixin: class RuleMixin:
""" """
Provides generic methods and helper methods to implement Provides generic methods and helper methods to implement
IRule and IRule and IMovementCollectionUpdater.
""" """
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -55,7 +55,7 @@ class RuleMixin: ...@@ -55,7 +55,7 @@ class RuleMixin:
""" """
Create a new applied rule in the context. Create a new applied rule in the context.
An applied rule is an instanciation of a Rule. The applied rule is An applied rule is an instantiation of a Rule. The applied rule is
linked to the Rule through the `specialise` relation. The newly linked to the Rule through the `specialise` relation. The newly
created rule should thus point to self. created rule should thus point to self.
...@@ -83,13 +83,13 @@ class RuleMixin: ...@@ -83,13 +83,13 @@ class RuleMixin:
applied rule. applied rule.
At expand time, we must replace or compensate certain At expand time, we must replace or compensate certain
properties. However, if some properties were overwriten properties. However, if some properties were overwritten
by a decision (ie. a resource if changed), then we by a decision (ie. a resource if changed), then we
should not try to compensate such a decision. should not try to compensate such a decision.
""" """
# Update movements # Update movements
# NOTE-JPS: it is OK to make rounding a standard parameter of rules # NOTE-JPS: it is OK to make rounding a standard parameter of rules
# altough rounding in simulation is not recommended at all # although rounding in simulation is not recommended at all
self.updateMovementCollection(applied_rule, movement_generator=self._geMovementGenerator()) self.updateMovementCollection(applied_rule, movement_generator=self._geMovementGenerator())
# And forward expand # And forward expand
for movement in applied_rule.getMovementList(): for movement in applied_rule.getMovementList():
...@@ -207,7 +207,7 @@ class RuleMixin: ...@@ -207,7 +207,7 @@ class RuleMixin:
kw = movement_diff.getMovementPropertyDict(movement) kw = movement_diff.getMovementPropertyDict(movement)
movement.edit(**kw) movement.edit(**kw)
for movement in movement_diff.getNewMovementList(): for movement in movement_diff.getNewMovementList():
# This cas is easy, cause it is an applied rule # This case is easy, because it is an applied rule
kw = movement_diff.getMovementPropertyDict(movement) kw = movement_diff.getMovementPropertyDict(movement)
movement = context.newContent(portal_type='Simulation Movement') movement = context.newContent(portal_type='Simulation Movement')
movement.edit(**kw) movement.edit(**kw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment