Command line interface

This tooling is a bit sparse right now. Perhaps other useful helpers will be identified in the future.

qts

qts [OPTIONS] COMMAND [ARGS]...

mypy

qts mypy [OPTIONS] COMMAND [ARGS]...

args

Generate arguments to be passed to mypy so it can understand which code should

be active. If applications or other libraries use the same conditions in their code then this will work for them as well. The output can be directly injected in some shells such as is done below in bash.

$ mypy $(qts mypy args --wrapper pyside6) my_file.py

The module import selection code in qts itself can act as a reference.

 1import qts
 2
 3
 4if qts.wrapper is None:
 5    qts.autoset_wrapper()
 6
 7if qts.is_pyqt_5_wrapper:
 8    from PyQt5.QtCore import *
 9elif qts.is_pyqt_6_wrapper:
10    from PyQt6.QtCore import *
11elif qts.is_pyside_5_wrapper:
12    from PySide2.QtCore import *
13elif qts.is_pyside_6_wrapper:
14    from PySide6.QtCore import *
15else:
16    raise qts.InvalidWrapperError(wrapper=qts.wrapper)
qts mypy args [OPTIONS]

Options

--wrapper <wrapper_name>
Options

PySide6 | PyQt6 | PySide2 | PyQt5

--delimiter <delimiter>

Defaults to a space for TTYs and a newline otherwise.