Skip to content

pyright --verifytypes reports incomplete coverage #3067

@adamtheturtle

Description

@adamtheturtle

I use pyright --verifytypes on https://github.com/adamtheturtle/doccmd and with 8.3.0 I get the following errors:

Module name: "doccmd"
Package directory: "/Users/adam/Documents/repositories/doccmd/src/doccmd"
Module directory: "/Users/adam/Documents/repositories/doccmd/src/doccmd"
Path of py.typed file: "/Users/adam/Documents/repositories/doccmd/src/doccmd/py.typed"

Public modules: 2
   doccmd
   doccmd.__main__

Symbols used in public interface:
click.core.Command.get_help_option
  /Users/adam/Documents/repositories/doccmd/.venv/lib/python3.12/site-packages/click/core.py:1044:9 - error: Return type is partially unknown
    Return type is "Option | None"
click.core.Option.default
  /Users/adam/Documents/repositories/doccmd/.venv/lib/python3.12/site-packages/click/core.py:2777:22 - error: Type is missing type annotation and could be inferred differently by type checkers
    Inferred type is "tuple[()]"
  /Users/adam/Documents/repositories/doccmd/.venv/lib/python3.12/site-packages/click/core.py:2777:22 - error: Type is missing type annotation and could be inferred differently by type checkers
    Inferred type is "bool"
  /Users/adam/Documents/repositories/doccmd/.venv/lib/python3.12/site-packages/click/core.py:2777:22 - error: Type is missing type annotation and could be inferred differently by type checkers
    Inferred type is "Any"
  /Users/adam/Documents/repositories/doccmd/.venv/lib/python3.12/site-packages/click/core.py:2777:22 - error: Type is missing type annotation and could be inferred differently by type checkers
    Inferred type is "int"
click.core.Option.type
  /Users/adam/Documents/repositories/doccmd/.venv/lib/python3.12/site-packages/click/core.py:2775:22 - error: Ambiguous base class override
    Type inferred in child class is "BoolParamType | ParamType | IntRange"

Symbols exported by "doccmd": 2
  With known type: 1
  With ambiguous type: 1
  With unknown type: 0

Other symbols referenced but not exported by "doccmd": 225
  With known type: 220
  With ambiguous type: 5
  With unknown type: 0

Symbols without documentation:
  Functions without docstring: 16
  Functions without default param: 0
  Classes without docstring: 5

Type completeness score: 50%

Would you be open to PRs from me which add type hints which address these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions