Skip to content

stub file not read when checking buffer #85

Open
@CamJN

Description

@CamJN

I have a __init__.py file with some code and a __init__.pyi stub file, the types are kept in the pyi file for better backwards compatibility. In emacs, with python-mode and lsp-mode enabled in the __init__.py buffer the stub file is not read when pyright performs error checking, so I get errors like:

   15  14 error    l-d---b  Type annotation is missing for parameter "pid"     
   15  14 error    l-d---b  Type of parameter "pid" is unknown                 
   15  19 error    l-d---b  Type annotation is missing for parameter "encoding"
   15  19 error    l-d---b  Type of parameter "encoding" is unknown            
   15  29 error    l-d---b  Type annotation is missing for parameter "skip"    
   15  39 error    l-d---b  Type annotation is missing for parameter "nuls"    
   17  20 error    l-d---b  Argument type is unknown                           
   17  44 error    l-d---b  Argument type is unknown                           
   19  19 error    l-d---b  Type annotation is missing for parameter "pid"     
   19  19 error    l-d---b  Type of parameter "pid" is unknown                 
   19  24 error    l-d---b  Type annotation is missing for parameter "encoding"
   19  24 error    l-d---b  Type of parameter "encoding" is unknown            
   21  21 error    l-d---b  Argument type is unknown                           
   21  48 error    l-d---b  Argument type is unknown                           

But the types are present in the stub file as verified with pyright --verifytypes getargv on the cli.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions