Skip to content

Commit

Permalink
Remove unnecessary 'type: ignore' comments in tracetools_trace (#151)
Browse files Browse the repository at this point in the history
They were added in 9450bfe, but they
are not needed, at least not anymore.

However, we still need them for the `.completer` assignments, since
that's not really an `argparse.Action` attribute. It's used by
`argcomplete`, if available.

Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard authored Feb 19, 2025
1 parent 03ccd0b commit 7a15085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tracetools_trace/tracetools_trace/tools/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ def _add_arguments_configure(parser: argparse.ArgumentParser) -> None:
help='path of the base directory for trace data (default: '
'$ROS_TRACE_DIR if ROS_TRACE_DIR is set and not empty, or '
'$ROS_HOME/tracing, using ~/.ros for ROS_HOME if not set or if empty)')
events_ust_arg = parser.add_argument( # type: ignore
events_ust_arg = parser.add_argument(
'-u', '--ust', nargs='*', dest='events_ust', metavar='EVENT',
default=names.DEFAULT_EVENTS_UST,
help='the userspace events to enable (default: see tracetools_trace.tools.names) '
'[to disable all UST events, '
'provide this flag without any event name]')
events_ust_arg.completer = DefaultArgValueCompleter(events_ust_arg) # type: ignore
events_kernel_arg = parser.add_argument( # type: ignore
events_kernel_arg = parser.add_argument(
'-k', '--kernel', nargs='*', dest='events_kernel', metavar='EVENT',
default=[],
help='the kernel events to enable (default: no kernel events)')
Expand All @@ -67,7 +67,7 @@ def _add_arguments_configure(parser: argparse.ArgumentParser) -> None:
'--syscall', nargs='*', dest='syscalls', metavar='SYSCALL',
default=[],
help='the syscalls to enable (default: no syscalls)')
context_arg = parser.add_argument( # type: ignore
context_arg = parser.add_argument(
'-c', '--context', nargs='*', dest='context_fields', metavar='CONTEXT',
default=names.DEFAULT_CONTEXT,
help='the context fields to enable (default: see tracetools_trace.tools.names) '
Expand Down

0 comments on commit 7a15085

Please sign in to comment.