GithubHelp home page GithubHelp logo

Comments (6)

zhaowcheng avatar zhaowcheng commented on May 26, 2024 1

@waketzheng
yes, pycharm can autocomplete when pydantic is v2, but vscode cannot.

from sqlmodel.

asacristani avatar asacristani commented on May 26, 2024

@zhaowcheng If you create a new object from this class, the autocompletion works:
image
Also if you try to access to the property directly:
image

So not sure what is happening in your end (maybe any VS code configuration is missing?)

from sqlmodel.

zhaowcheng avatar zhaowcheng commented on May 26, 2024

@asacristani , thank you for your answer.

I downgraded pydantic from v2 to v1 and it worked.

Is this a bug in sqlmodel?

from sqlmodel.

waketzheng avatar waketzheng commented on May 26, 2024

Autocomplete worked for me with latest version of sqlmodel and pydantic2.5.3 (Python3.11/Pycharm)
image

image

from sqlmodel.

dipsx avatar dipsx commented on May 26, 2024

@waketzheng yes, pycharm can autocomplete when pydantic is v2, but vscode cannot.

same issue in vscode on windows

from sqlmodel.

Abeautifulsnow avatar Abeautifulsnow commented on May 26, 2024

I usually develop on WSL1 for windows. And the autocompletion functionality works fine in my vscode.
image

And my packages infos are below:

pydantic          2.7.1    Data validation using Python type hints
sqlmodel          0.0.18   SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.

from sqlmodel.

Related Issues (20)

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.