Skip to content

Commit

Permalink
Attemp to improce code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
TayYim committed Jun 7, 2024
1 parent 99268a4 commit 8e00d80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/static_code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
- name: Check Code Format
uses: peter-evans/[email protected]
with:
# Arguments to pass to autopep8
args: --max-line-length=120 --ignore=E731 --recursive --in-place
args: --max-line-length=120 --ignore=E731 --recursive --in-place .

qualityJob:
name: Check Code Quality
Expand Down
5 changes: 4 additions & 1 deletion scenario_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@
try:
# requires Python 3.8+
from importlib.metadata import metadata

def get_carla_version():
"""get the version of the CARLA package
"""
return Version(metadata("carla")["Version"])
except ModuleNotFoundError:
# backport checking for older Python versions; module is deprecated
import pkg_resources

def get_carla_version():
"""same but for older Python versions
"""
return Version(pkg_resources.get_distribution("carla").version)

import carla
Expand Down

0 comments on commit 8e00d80

Please sign in to comment.