()
| 94 | |
| 95 | @pytest.mark.mypy_testing |
| 96 | def mypy_list_typing() -> None: |
| 97 | class T(HasTraits): |
| 98 | latex_command = List( |
| 99 | ["xelatex", "{filename}", "-quiet"], help="Shell command used to compile latex." |
| 100 | ).tag(config=True) |
| 101 | |
| 102 | t = T() |
| 103 | reveal_type(List(["foo"])) # R: traitlets.traitlets.List[builtins.str] |
| 104 | reveal_type(List([""]).tag(sync=True)) # R: traitlets.traitlets.List[builtins.str] |
| 105 | reveal_type(List(None, allow_none=True)) # R: traitlets.traitlets.List[Never] |
| 106 | reveal_type( |
| 107 | List(None, allow_none=True).tag(sync=True) # R: traitlets.traitlets.List[Never] |
| 108 | ) |
| 109 | reveal_type(T.latex_command) # R: traitlets.traitlets.List[builtins.str] |
| 110 | reveal_type(t.latex_command) # R: builtins.list[builtins.str] |
| 111 | |
| 112 | |
| 113 | @pytest.mark.mypy_testing |
nothing calls this directly
no test coverage detected
searching dependent graphs…