Coder Social home page Coder Social logo

Comments (2)

alessiocastrica avatar alessiocastrica commented on June 12, 2024

Hi @impredicative this is not a bug, it's expected since you're using the python built-in function dir() which is returning a list of all valid attributes in an object.
Since snapshot is an instance of a sub-class of a pydantic BaseModel it inherits all the attributes of a standard BaseModel, including the ones you listed. There's no code on alpaca-py to add any of those fields, and this is just related to the fact that we use pydantic for data validation.

I'm not sure what's your use case, but if you don't want to see those attributes, you simply don't need to use the dir() function.
The representation of the snapshot object won't include them, and they're not included in the model_fields as well.
Screenshot 2023-10-17 at 14 19 13

from alpaca-py.

impredicative avatar impredicative commented on June 12, 2024

An IDE such as PyCharm visibly and graphically shows the distracting model attributes, which is why I opened this issue. I do not use dir for development purposes.

from alpaca-py.

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.