Giter Club home page Giter Club logo

Comments (3)

matthewhegarty avatar matthewhegarty commented on June 2, 2024 1

Hi - thanks for the offer of help. I would agree with the view that it would be nice to have, but probably not required for a project like this. Therefore I would conclude that we don't need type hints at this time.

If any other users have a view on this, they can add to this thread, and we can keep it in mind for later versions such as v5.

from django-import-export.

andrewgy8 avatar andrewgy8 commented on June 2, 2024

Thanks @Viicos for opening this issue. Do you know of any other large Django projects that have embraced type hints? And what has the reaction been like from the community after they added them?

In a declarative library like django-import-export, Im struggling to see the benefits of adding them.

from django-import-export.

Viicos avatar Viicos commented on June 2, 2024

I recently did it in django-modeltranslation (but it isn't merged yet). My personal experience with it is that:

  • whenever a library is dealing with Django internals, it gets tricky (sometimes Django stubs are incorrect, and dynamic stuff is hard to support). But it did help understand what django-modeltranslation was doing in some cases.
  • The benefit for declarative libraries is limited (from an end user perspective), however I can see the benefit for some public methods called by such end users (resource.export(), modelresource_factory for instance).

So I think type hints would still be a nice addition (as stubs or in the library), although I do agree it isn't a strong requirement as most of the library is declarative

from django-import-export.

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.