Skip to content

Commit ab57d74

Browse files
committed
fix lint errors
1 parent 6c97e17 commit ab57d74

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/lint.yaml

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
include:
29-
- { python-version: 3.6, name: flake8, cmd: flake8, }
30-
- { python-version: 3.7, name: flake8, cmd: flake8, }
31-
- { python-version: 3.8, name: flake8, cmd: flake8, }
32-
- { python-version: 3.9, name: flake8, cmd: flake8, }
33-
- { python-version: 3.9, name: pydocstyle, cmd: pydocstyle, }
34-
- { python-version: 3.6, name: pylint, cmd: pylint }
35-
- { python-version: 3.7, name: pylint, cmd: pylint }
36-
- { python-version: 3.8, name: pylint, cmd: pylint }
37-
- { python-version: 3.9, name: pylint, cmd: pylint }
38-
- { python-version: 3.9, name: isort, cmd: isort --check-only }
39-
- { python-version: 3.9, name: bandit, cmd: bandit -r }
29+
- { python-version: 3.6, name: flake8, cmd: flake8, }
30+
- { python-version: 3.7, name: flake8, cmd: flake8, }
31+
- { python-version: 3.8, name: flake8, cmd: flake8, }
32+
- { python-version: 3.9, name: flake8, cmd: flake8, }
33+
- { python-version: 3.9, name: pydocstyle, cmd: pydocstyle, }
34+
- { python-version: 3.6, name: pylint, cmd: pylint --extension-pkg-whitelist=vl53l5cx_py }
35+
- { python-version: 3.7, name: pylint, cmd: pylint --extension-pkg-whitelist=vl53l5cx_py }
36+
- { python-version: 3.8, name: pylint, cmd: pylint --extension-pkg-whitelist=vl53l5cx_py }
37+
- { python-version: 3.9, name: pylint, cmd: pylint --extension-pkg-whitelist=vl53l5cx_py }
38+
- { python-version: 3.9, name: isort, cmd: isort --check-only }
39+
- { python-version: 3.9, name: bandit, cmd: bandit -r }
4040
steps:
4141
- uses: actions/checkout@v2
4242
- uses: actions/setup-python@v2

arenarobot/scripts/arena_robot_service.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def main() -> int:
2525
help='service file device path')
2626
args = parser.parse_args()
2727

28-
with open(args.service_config_file) as file:
28+
with open(args.service_config_file, encoding="utf8") as file:
2929
service_config = json.load(file)
3030

3131
service_type = service_config.get("service_type", "unknown")

arenarobot/service/sensor/vl53l5cx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, dev_path: str, gpio_path: str, lpn_pins: Sequence[int],
4444

4545
def setup(self):
4646
"""Set up VL53L5CX sensor."""
47-
for i in range(len(self.lpn_pins)):
47+
for i in enumerate(self.lpn_pins):
4848
pin_num = self.lpn_pins[i]
4949
pin = GPIO(self.gpio_path, pin_num, "out")
5050
pin.write(False)

0 commit comments

Comments
 (0)