cursorless
cursorless copied to clipboard
Pyright Configuration for CI Pipeline
Discussed with Pokey at Cursorless meetup last weekend about Pyright CI. Posting this here as a discussion to evaluate if Pyright is useful for Cursorless in its CI pipeline.
Downside for Pyright integration
- Since we can't install Talon in CI, we essentially have to ignore all Talon typing and imports unless we import typing stubs or something analogous
error: Import "talon" could not be resolved (reportMissingImports)
- Talon scripting with Python has development patterns that deviate from the norm so we have to ignore some errors similar to the following
error: Type of parameter "key" must be a supertype of its class "Actions" (reportGeneralTypeIssues)
- Not entirely sure why you can't get around the "type of parameter X must be a supertype" but since it throws an error you essentially have to disable all
reportGeneralTypeIssuesto get rid of it. - submitted issue to https://github.com/microsoft/pyright/issues/7513
Current Config
[tool.pyright]
# Talon classes don't use self so ignore the associated errors
reportSelfClsParameterName = false
# Talon can't be installed in CI so ignore source errors
reportMissingModuleSource = false
reportMissingImports = false
May or may not want the following
# Ignore the type of parameter X must be a supertype of its class
# reportGeneralTypeIssues = false