Fix lint and formatting errors

This commit is contained in:
Christophe Bedard 2019-06-24 16:13:42 +02:00
parent de8c131a34
commit 82d2d26f9a
7 changed files with 32 additions and 17 deletions

View file

@ -16,8 +16,8 @@
from ros2cli.command import CommandExtension
from ros2trace.api import add_trace_arguments
from ros2trace.api import init
from ros2trace.api import fini
from ros2trace.api import init
class TraceCommand(CommandExtension):

View file

@ -7,8 +7,14 @@ setup(
packages=find_packages(exclude=['test']),
install_requires=['ros2cli'],
zip_safe=True,
maintainer='Christophe Bedard, Ingo Lütkebohle',
maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com',
maintainer=(
'Christophe Bedard, '
'Ingo Lütkebohle'
),
maintainer_email=(
'fixed-term.christophe.bourquebedard@de.bosch.com, '
'ingo.luetkebohle@de.bosch.com'
),
author='Christophe Bedard',
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
# url=',

View file

@ -14,8 +14,14 @@ setup(
('share/' + package_name + '/launch', glob.glob('launch/*.launch.py')),
],
install_requires=['setuptools'],
maintainer='Christophe Bedard, Ingo Lütkebohle',
maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com',
maintainer=(
'Christophe Bedard, '
'Ingo Lütkebohle'
),
maintainer_email=(
'fixed-term.christophe.bourquebedard@de.bosch.com, '
'ingo.luetkebohle@de.bosch.com'
),
author='Christophe Bedard',
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
# url='',

View file

@ -11,8 +11,14 @@ setup(
('share/' + package_name, ['package.xml']),
],
install_requires=['setuptools'],
maintainer='Christophe Bedard, Ingo Lütkebohle',
maintainer_email='fixed-term.christophe.bourquebedard@de.bosch.com, ingo.luetkebohle@de.bosch.com',
maintainer=(
'Christophe Bedard, '
'Ingo Lütkebohle'
),
maintainer_email=(
'fixed-term.christophe.bourquebedard@de.bosch.com, '
'ingo.luetkebohle@de.bosch.com'
),
author='Christophe Bedard',
author_email='fixed-term.christophe.bourquebedard@de.bosch.com',
# url='',

View file

@ -32,9 +32,7 @@ class DefaultArgValueCompleter:
def parse_args():
"""
Parse args for tracing.
"""
"""Parse args for tracing."""
parser = argparse.ArgumentParser(description='Setup and launch an LTTng tracing session.')
add_arguments(parser)
return parser.parse_args()

View file

@ -15,10 +15,10 @@
"""Interface for tracing with LTTng."""
import sys
from typing import List
# Temporary workaround
sys.path = ['/usr/local/lib/python3.6/site-packages'] + sys.path
from typing import List
import lttng # noqa: E402
@ -206,7 +206,7 @@ def _create_session(session_name: str, full_path: str) -> None:
if result == -LTTNG_ERR_EXIST_SESS:
# Sessions seem to persist, so if it already exists,
# just destroy it and try again
lttng_destroy(session_name)
_lttng_destroy(session_name)
result = lttng.create(session_name, full_path)
if result < 0:
raise RuntimeError(f'session creation failed: {lttng.strerror(result)}')

View file

@ -19,7 +19,6 @@ import os
from tracetools_trace.tools import args
from tracetools_trace.tools import lttng
from tracetools_trace.tools import names
def main():