Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PyCharm #11151

Open
stuhood opened this issue Nov 12, 2020 · 3 comments
Open

Add support for PyCharm #11151

stuhood opened this issue Nov 12, 2020 · 3 comments

Comments

@stuhood
Copy link
Sponsor Member

stuhood commented Nov 12, 2020

The IntelliJ folks have a prototype BSP client for Python in IntelliJ/PyCharm, which they hope to be able to deliver in "the next release" (as of May 24th 2023). There has been some communication in the BSP discord.

Pants already supports acting as a BSP server for Java/Scala (this is full protocol conversation for running a unit test), so when the client is there, adding support for acting as a BSP server for Python should be all that is necessary, in theory: https://build-server-protocol.github.io/docs/extensions/python/

@cognifloyd
Copy link
Member

One thing I would like to see with a pycharm plugin:

The pydevd-pycharm package should be injected (maybe added to the pex path) for all tests and runs. This way, the debugger will function appropriately.

I tried adding this in the st2 project, but the version is specific to my version of pycharm, and the other st2 devs didn't want to include an IDE specific thing.

python_requirement(
    name="pydevd-pycharm",
    requirements=["pydevd-pycharm==221.5080.212"],
)

@paiforsyth
Copy link
Contributor

Would it be possible for a PyCharm plugin to optionally use the visibility restrictions implemented here: #17401 to filter PyCharm's auto-import suggestions? That is, if I type a symbol and then hit OPTION+ENTER on my mac to get auto-import suggestions, I would ideally only want to see modules that it is legal for me to import according to the visibility rules defined in Pants' build files.

@stuhood
Copy link
Sponsor Member Author

stuhood commented May 24, 2023

Have updated the description to mention that there has been progress from JetBrains on BSP client support for Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: No status
Development

No branches or pull requests

5 participants