Giter VIP home page Giter VIP logo

pyright-for-pycharm's People

Contributors

dependabot[bot] avatar insyncwithfoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyright-for-pycharm's Issues

Not getting any Pyright warnings

What happened?

Hey, so I followed the docs to install Pyright for PyCharm (community version), but I don't see any warnings/errors on this code:
image

I'm not sure if I didn't install it correctly or there is a bug...

Steps to reproduce

  • Install the plugin trough Pycharm
  • Configure the path: pypoetry/virtualenvs/project-name/bin/pyright-python-langserver (I tried all 3 pyright executables)
  • Tried with and without passing the config file: pyproject.toml
  • Check Prefix with "Pyright: "
  • Disable Incorrect type in the inspections tab
  • Enable Pyright diagnostics
  • Restart PyCharm

Relevant log output or stack trace

No response

Operating system

Linux

v0.1.0-mvp.5 configuration panels don't react to changes

This is presumably due to the UI overhaul in 6e4f8c7, which introduced bind*() calls:

makeGlobalExecutableInput {
    // ...
    bindText(state::globalExecutable)
}
row(NO_LABEL) {
    makeAlwaysUseGlobalInput().bindSelected(state::alwaysUseGlobal)
}

Apparently, this behaviour is "documented":

The property is applied only when DialogPanel.apply() is invoked.

โ€” Cell.bind | Kotlin UI DSL Version 2

I'm not sure what that means exactly (am I supposed to call that method or what?) but I'm working on a fix. v0.1.0-mvp.5 is hereby yanked and should not be used.

Better configurations sharing between Linux and Windows

Feature or enhancement

On Linux:

  • Virtual environment executables directory: venv/bin/
  • Extension: None

On Windows:

  • Virtual environment executables directory: venv\Scripts\
  • Extension: .exe

It would be nice if project configurations can be shared among colleagues who use different OSes.

Proposed solution

A new configuration should be added as a checkbox in the project-level panel. The path resolving algorithm also needs modifications:

  1. If there is a file/directory/symlink/etc. at the precise path given, use that.
  2. Otherwise, if the topmost fragment has no extension, append the corresponding extension by OS and redo step 1.

The hard part of this is to make the UI hint react when the checkbox changes its state.

Settings don't persist

What happened?

I've downloaded and installed plugin version 0.1.0-mvp.5 into intelliJ IDEA 2023.3.5

When editing the global or local settings, they simply won't save. When I add the path to the executable or config file, I see the 'file found' tick, but the 'Apply' button never enables, and click 'OK' simply closes the Settings dialog, but the values are not saved/

Relevant log output or stack trace

No response

Steps to reproduce

  1. Download Pyright-0.1.0-mvp.5.zip
  2. Install the plugin from DIsk
  3. Try to configure the Global or Project settings
  4. Close the settings dialog
  5. Reopen and see that the configuration values did not persist

Operating system

macOS

Allow configuring highlight severity levels

From this review:

The one thing I find hard with this plugin is the way in which these errors are reported. Instead of the nice, yellowish warnings you usually see, they will be reported as full on errors (with red underlines).

By default:

Pyright IDE
Errors Errors
Warnings Warnings
Info Weak warnings

CLI previously had lower levels, but it was changed to match LSP. I still think this is a sane default and thus it will likely not change.

However, considering that many Python users have come to it due to its dynamicity, they probably don't want to see type errors highlighted as bona fide errors.

Missing releases zip

Maybe it expired? I think I have the tooling setup to build this on my own but wanted to check and see if you have a release zip handy?

Support WSL based pyright executable

Feature or enhancement

Excited about this project. I typically have my source code and interpreter running in WSL and my pycharm instance running in windows. Pycharm supports this nicely and I am able to run/debug/edit the source code based in WSL. I have pyright installed in WSL and tried to configure the plugin to use the pyright executable with a WSL based path (\wsl.ubuntu\...) and the configuration dialog says the executable is 'Not Found'. I confirmed it does find a version of the executable installed in windows directly (e.g. c:..), but I don't expect that to work with a WSL based project (and it did not).

Proposed solution

I am not sure why the executable I am suggesting is showing up as not found by the configuration UI. It is possible that the validation just needs to be adjusted to handle these UNC paths and then it would work? It also may require downstream logic to support paths of this type.

Alternatives considered

As I mentioned I tried using a local executable and it did not work with a WSL based project.

Additional context

Happy to provide any further information. Excited to be able to use this project.

Plugin blocks `black` Formatter _on save_ action

What happened?

As of installing this plugin, the on save action, to execute black formatter, gets disabled.

Steps to reproduce

  • Have black configured on save
    image
  • Install and enable the Pyright plugin
  • The save action stops working

Relevant log output or stack trace

No response

Operating system

macOS

Constant save bothering who use format on save features

What happened?

The plugin is constantly performing save, and too fast. For who use formatter triggered on save it becomes hard to work.

Screen.Recording.2024-03-13.at.15.31.43.mov

Is it possible to avoid that?

I totally understand if this is the only way that the plugin can work.

Relevant log output or stack trace

No response

Steps to reproduce

Use some formatter on save.

Operating System

None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.