Skip to content

Commit

Permalink
enable almost all flake8 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Jun 1, 2020
1 parent 58878bf commit 3ad1ac0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ repos:
hooks:
- id: flake8
args:
- --select=F
- --ignore=E111,E114,E121,E124,E302,E501
- --statistics
- repo: local
hooks:
- id: pylint
Expand Down
6 changes: 3 additions & 3 deletions messaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from .messaging_pyx import MultiplePublishersError, MessagingError # pylint: disable=no-name-in-module, import-error
import capnp

assert MultiplePublishersError
assert MessagingError

from cereal import log
from cereal.services import service_list

assert MultiplePublishersError
assert MessagingError

# sec_since_boot is faster, but allow to run standalone too
try:
from common.realtime import sec_since_boot
Expand Down
3 changes: 2 additions & 1 deletion services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
import os
import yaml


class Service():
def __init__(self, port, should_log, frequency, decimation=None):
self.port = port
self.should_log = should_log
self.frequency = frequency
self.decimation = decimation


service_list_path = os.path.join(os.path.dirname(__file__), "service_list.yaml")

service_list = {}
Expand All @@ -30,4 +32,3 @@ def __init__(self, port, should_log, frequency, decimation=None):
print(' { .name = "%s", .port = %d, .should_log = %s, .frequency = %d, .decimation = %d },' % (k, v.port, "true" if v.should_log else "false", v.frequency, -1 if v.decimation is None else v.decimation))
print("};")
print("#endif")

0 comments on commit 3ad1ac0

Please sign in to comment.