fannheyward / coc-basedpyright

Basedpyright extension for coc.nvim
MIT License
6 stars 0 forks source link

Issue when using coc-basedpyright with framework #21

Closed tahseenjamal closed 2 months ago

tahseenjamal commented 2 months ago

Link to my .vimrc configuration

Steps to repeat

  1. Install VIM (vim editor)
  2. Use my .vimrc file config
  3. Then run :PluginInstall inside vim and then exit
  4. After this you would have to run npm install inside ~/.vim/bundle/coc.nvim folder
  5. Now install miniconda https://docs.anaconda.com/miniconda/
  6. Created new environment with python 3.11 and masonite 4 framework (pip install masonite==4.20.0)
  7. Switch to this new environment
  8. Create a new project using command project start blog
  9. Then go into the blog folder
  10. Open vi and run inside it :CocInstall coc-basedpyright
  11. Now open blog/app/controllers/WelcomeController.py and you would see

You would see stub error on all masonite imports, below as one e.g. Stub file not found for "masonite.request" (basedpyright from reportMissingTypeStubs)

And also coc error in the status line of vim like below [coc.nvim] Request workspace/configuration failed with message: Cannot read properties of undefined (reading 'stubPath')

tahseenjamal commented 2 months ago

I managed to configure in pyproject.toml

[tool.basedpyright]
reportMissingTypeStubs = false
reportUnknownMemberType = false

to resolve the stub file not found error

But how to resolve the coc.nvim error for workspace/configuration failed error ?

fannheyward commented 2 months ago

Fixed in v1.17.0, now you can disable in coc-settings.json

  "basedpyright.analysis.diagnosticSeverityOverrides": {
    "reportMissingTypeStubs": false
  },