Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CI reports mypy issues #160

Open
christophebedard opened this issue Mar 19, 2025 · 0 comments
Open

GitHub CI reports mypy issues #160

christophebedard opened this issue Mar 19, 2025 · 0 comments
Assignees

Comments

@christophebedard
Copy link
Member

Some mypy issues started being reported by GitHub CI a few weeks ago in tracetools_test, test_tracetools_launch, and tracetools_launch:

tracetools_test/utils.py: note: In function "run_and_trace":
tracetools_test/utils.py:80:31: error: Argument 1 to "append" of "list" has incompatible type "Node"; expected "Trace"  [arg-type]
tracetools_test/utils.py:81:27: error: Argument 1 to "extend" of "list" has incompatible type "list[Action]"; expected "Iterable[Trace]"  [arg-type]

test/test_tracetools_launch/test_trace_action.py: note: In member "_assert_launch_frontend_no_errors" of class "TestTraceAction":
test/test_tracetools_launch/test_trace_action.py:73:16: error: Incompatible return value type (got "LaunchDescriptionEntity", expected "Trace")  [return-value]
test/test_tracetools_launch/test_trace_action.py: note: In member "test_action_context_per_domain" of class "TestTraceAction":
test/test_tracetools_launch/test_trace_action.py:216:13: error: Argument 1 to "assertDictEqual" of "TestCase" has incompatible type "Mapping[str, Iterable[list[Substitution]]] | Iterable[list[Substitution]]"; expected "Mapping[Any, object]"  [arg-type]
test/test_tracetools_launch/test_trace_action.py: note: In member "test_action_substitutions" of class "TestTraceAction":
test/test_tracetools_launch/test_trace_action.py:261:13: error: Argument 1 to "assertDictEqual" of "TestCase" has incompatible type "Mapping[str, Iterable[list[Substitution]]] | Iterable[list[Substitution]]"; expected "Mapping[Any, object]"  [arg-type]
test/test_tracetools_launch/test_trace_action.py: note: In member "test_append_timestamp" of class "TestTraceAction":
test/test_tracetools_launch/test_trace_action.py:345:25: error: "list[Substitution]" has no attribute "startswith"  [attr-defined]

tracetools_launch/actions/ld_preload.py: note: In member "execute" of class "LdPreload":
tracetools_launch/actions/ld_preload.py:84:5: error: Return type "list[Action] | None" of "execute" incompatible with return type "list[LaunchDescriptionEntity] | None" in supertype "Action"  [override]
tracetools_launch/actions/ld_preload.py:86:21: error: List item 0 has incompatible type "Action | None"; expected "Action"  [list-item]
tracetools_launch/action.py: note: In member "context_fields" of class "Trace":
tracetools_launch/action.py:212:16: error: Incompatible return value type (got "Collection[list[Substitution] | Any | str]", expected "Mapping[str, Iterable[list[Substitution]]] | Iterable[list[Substitution]]")  [return-value]
tracetools_launch/action.py: note: In member "_perform_substitutions" of class "Trace":
tracetools_launch/action.py:386:30: error: Incompatible types in assignment (expression has type "str", variable has type "list[Substitution]")  [assignment]
tracetools_launch/action.py:388:34: error: Incompatible types in assignment (expression has type "str", variable has type "list[Substitution]")  [assignment]
tracetools_launch/action.py:388:56: error: Argument 1 to "append_timestamp" has incompatible type "list[Substitution]"; expected "str"  [arg-type]
tracetools_launch/action.py:389:27: error: Incompatible types in assignment (expression has type "str", variable has type "list[Substitution] | None")  [assignment]
tracetools_launch/action.py:391:29: error: List comprehension has incompatible type List[str]; expected List[list[Substitution]]  [misc]
tracetools_launch/action.py:392:32: error: List comprehension has incompatible type List[str]; expected List[list[Substitution]]  [misc]
tracetools_launch/action.py:393:27: error: List comprehension has incompatible type List[str]; expected List[list[Substitution]]  [misc]
tracetools_launch/action.py:400:50: error: Argument 2 to "perform_substitutions" has incompatible type "list[Substitution] | Any | str"; expected "list[Substitution]"  [arg-type]
tracetools_launch/action.py:403:41: error: Argument 1 to "has_libc_wrapper_events" of "Trace" has incompatible type "list[list[Substitution]]"; expected "list[str]"  [arg-type]
tracetools_launch/action.py:405:44: error: Argument 1 to "has_pthread_wrapper_events" of "Trace" has incompatible type "list[list[Substitution]]"; expected "list[str]"  [arg-type]
tracetools_launch/action.py:407:31: error: Argument 1 to "has_dl_events" of "Trace" has incompatible type "list[list[Substitution]]"; expected "list[str]"  [arg-type]
tracetools_launch/action.py:410:63: error: Argument 1 to "has_profiling_events" of "Trace" has incompatible type "list[list[Substitution]]"; expected "list[str]"  [arg-type]
tracetools_launch/action.py:411:65: error: Argument 1 to "has_profiling_events" of "Trace" has incompatible type "list[list[Substitution]]"; expected "list[str]"  [arg-type]
tracetools_launch/action.py: note: In member "execute" of class "Trace":
tracetools_launch/action.py:420:5: error: Return type "list[Action] | None" of "execute" incompatible with return type "list[LaunchDescriptionEntity] | None" in supertype "Action"  [override]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant