diff --git a/.github/workflows/autopep8.yml b/.github/workflows/autopep8.yml index a866977f..999b02cb 100644 --- a/.github/workflows/autopep8.yml +++ b/.github/workflows/autopep8.yml @@ -20,15 +20,4 @@ jobs: id: check run: | # Check if autopep8 would make changes - formatting_issues=$(autopep8 --diff --recursive --max-line-length 120 .) - if [[ formatting_issues ]] then - echo "Formatting issues found:" - printf "%s\n" "$formatting_issues" - echo "------------------------------" - echo "-- Formatting issues found! --" - echo "------------------------------" - exit 1 - else - echo "No formatting issues found." - fi - + autopep8 --diff --recursive --max-line-length 120 --exit-code . diff --git a/robotmbt/tracestate.py b/robotmbt/tracestate.py index 9aaff77b..22526748 100644 --- a/robotmbt/tracestate.py +++ b/robotmbt/tracestate.py @@ -162,5 +162,9 @@ class TraceSnapShot: def __init__(self, id, inserted_scenario, model_state, drought=0): self.id = id self.scenario = inserted_scenario - self.model = model_state.copy() + self._model = model_state.copy() self.coverage_drought = drought + + @property + def model(self): + return self._model.copy()