question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autoimport breaks when enabling the plugin

See original GitHub issue

Describe the bug Having the pydantic-pycharm-plugin enabled breaks autoimports.

To Reproduce Steps to reproduce the behavior:

  1. Install the pydantic plugin and enable it
  2. Create a simple file main.py with the content:
from typing import Optional
from pydantic import BaseModel


class Item(BaseModel):
    name: str
    description: Optional[str] = Field()
    price: float
    tax: Optional[float] = None
  1. Navigate the caret between Field and ().
  2. ctrl+space+space or alt+enter
  3. No pydantic import suggested

bilde
bilde

  1. Disable pydantic plugin
  2. Try the same:

bilde
bilde

Expected behavior Autoimports should work.

Environments (please complete the following information):

  • IDE: PyCharm Professional 2021.1 (Edit: Tested in 201.1.1 as well. Same issue)
  • OS: Red Hat Enterprise Linux release 8.3 (Ootpa)
  • Pydantic Versio: 1.8.1
  • Plugin version: 0.3.0

Additional context I’ve tried recreating the environment, clearing and invalidating cache.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
JonasKscommented, May 9, 2021

I’ll check out both pipx and your poetry plugin, thank you!!

Also, You are sponsoring me!!

I listened to episode 313 of talkpython.fm. Creator of pydantic gave you some nice words and in the end of the episode he encourages not only sponsoring the huge packages, but also those who make those packages awesome. This is one of them. 😊 So my pleasure.

2reactions
ArcLightSlavikcommented, Apr 28, 2021

Screenshot_from_2021-04-28_16-51-19

Tried on Ubuntu 20.04.2 with Pycharm: 2021.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Import not working (Typescript ) after latest update #132299
With lit-plugin installed and enabled: No import is added ... As I mentioned above, auto import isn't completely broken for me.
Read more >
Broken autoimport in Visual Studio Code - Stack Overflow
json file (in your project root directory) should enable automatic imports now without the need for any separate extensions. Share.
Read more >
Auto Import - ES6, TS, JSX, TSX (VSCode Extension)
Extension for Visual Studio Code - Automatically finds, parses and provides code actions and code completion for all available imports.
Read more >
New: Bard Free Wordpress Blog Theme - YouTube
New: Bard Free Wordpress Blog Theme - Demo Content Import ( Autoimport with Plugin ) Updated. Watch later. Share. Copy link.
Read more >
Import All broken with Auto Import - Pipeline & Plugins
When using auto-import/reimport system, I am presented with the import options dialog for each asset. Pressing either Import or Import All ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found