Skip to content
Snippets Groups Projects
Commit bcda1261 authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Format (ruff + black config)

parent 0f9e33c2
No related branches found
No related tags found
1 merge request!1First try of type hints
......@@ -29,3 +29,9 @@ dependencies = [
Homepage = "https://recherche.imt-atlantique.fr/xaal/"
Documentation = "https://redmine.imt-atlantique.fr/projects/xaal/repository/xaal/entry/code/Python/branches/0.7/libs/lib/README.rst"
Source = "https://redmine.imt-atlantique.fr/projects/xaal/repository/xaal/show/code/Python/branches/0.7/libs/lib"
[tool.ruff]
line-length = 120
[tool.black]
line-length = 120
......@@ -57,10 +57,11 @@ class MessageAction(Enum):
GET_ATTRIBUTES = "get_attributes"
GET_DESCRIPTION = "get_description"
class Message(object):
"""Message object used for incomming & outgoint message"""
__slots__ = ['version', 'timestamp', 'source', 'dev_type', 'msg_type', 'action', 'body', '__targets']
__slots__ = ["version", "timestamp", "source", "dev_type", "msg_type", "action", "body", "__targets"]
def __init__(self):
self.version = config.STACK_VERSION # message API version
......@@ -100,7 +101,7 @@ class Message(object):
if self.body:
tmp = ""
for k, v in self.body.items():
k = k + ':'
k = k + ":"
v = pprint.pformat(v, width=55)
tmp = tmp + "- %-12s %s\n" % (k, v)
# tmp = tmp.strip()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment