diff --git a/.github/workflows/static_code_check.yml b/.github/workflows/static_code_check.yml index 9cbfac5f3..db310ebb0 100644 --- a/.github/workflows/static_code_check.yml +++ b/.github/workflows/static_code_check.yml @@ -19,19 +19,8 @@ jobs: sudo apt-get update sudo apt-get install pep8 python3-autopep8 python3-pep8 python-is-python3 - # - name: Check Code Format - # run: | - # autopep8 srunner/scenariomanager/*.py --in-place --max-line-length=120 --ignore=E731 - # autopep8 srunner/scenariomanager/scenarioatomics/*.py --in-place --max-line-length=120 - # autopep8 srunner/scenarios/*.py --in-place --max-line-length=120 - # autopep8 srunner/tools/*.py --in-place --max-line-length=120 - # autopep8 srunner/scenarioconfigs/*.py --in-place --max-line-length=120 - # autopep8 scenario_runner.py --in-place --max-line-length=120 - # autopep8 srunner/autoagents/*.py --in-place --max-line-length=120 - # git diff --quiet HEAD --; if [ ! $? -eq 0 ]; then echo "Code is not autopep8 compliant. Please run code_check_and_formatting.sh"; git diff HEAD --; fi - - name: Check Code Format - uses: peter-evans/autopep8@v2.0.0 + uses: peter-evans/autopep8@v2 with: args: --max-line-length=120 --ignore=E731 --recursive --in-place . diff --git a/scenario_runner.py b/scenario_runner.py index 0e3b5455f..7aa2baedd 100755 --- a/scenario_runner.py +++ b/scenario_runner.py @@ -35,6 +35,7 @@ try: # requires Python 3.8+ from importlib.metadata import metadata + def get_carla_version(): """get the version of the CARLA package """ diff --git a/srunner/tests/carla_mocks/carla.py b/srunner/tests/carla_mocks/carla.py index fe1aa9375..076d66266 100644 --- a/srunner/tests/carla_mocks/carla.py +++ b/srunner/tests/carla_mocks/carla.py @@ -273,7 +273,7 @@ def get_settings(self): def get_map(self): return self.map - + def set_map(self, map): self.map = map