Coder Social home page Coder Social logo

Comments (8)

hauntsaninja avatar hauntsaninja commented on July 28, 2024 1

Hmm, not sure the actual version of typing_extensions should matter (at least at type check time, which OP's error definitely is); mypy should just be looking at the typeshed stubs.

(In fact, mypy thinks typing_extensions is part of the standard library, so you can actually type check without having it installed, like in the days before modular typeshed)

If OP could provide a script that reproduces the error, ideally from a fresh virtual environment, that would be very helpful!

from typing_extensions.

srittau avatar srittau commented on July 28, 2024

Maybe @nipunn1313 has some insight what could be wrong here.

from typing_extensions.

hauntsaninja avatar hauntsaninja commented on July 28, 2024

What mypy version are you using? Try 0.930

from typing_extensions.

nipunn1313 avatar nipunn1313 commented on July 28, 2024

It requires mypy 0.930

if you can’t resolve:

What version of mypy, mypy_protobuf, and python are you using?

from typing_extensions.

siddharthrajaraja avatar siddharthrajaraja commented on July 28, 2024

I used python 3.8.x , mypy 0.930 and my_protobuf 3.1.0 @nipunn1313

from typing_extensions.

siddharthrajaraja avatar siddharthrajaraja commented on July 28, 2024

@nipunn1313 , it will be good if you help me out with exact versions needed to resolve this issue

from typing_extensions.

nipunn1313 avatar nipunn1313 commented on July 28, 2024

Hmm.

Ok here's a hypothesis.
What version of typing_extensions do you have?

 pip3 show typing_extensions

It looks like it was added with python/typing@6d287f0 in 3.7.4.2 (which released July 2020). Is it possible you have a version older than that installed?

If this is the case leading to the issue, I think the more permanent solution is to add it to the setup requirements for mypy-protobuf (https://github.com/dropbox/mypy-protobuf/blob/main/setup.cfg#L19), and the documentation.

Sorry for the trouble - hoping you can help validate if this hypothesis and see if it helps with the issue.

from typing_extensions.

siddharthrajaraja avatar siddharthrajaraja commented on July 28, 2024

We can mark this closed as I changed the mypy version to latest and it worked for me. Thanks everyone.

from typing_extensions.

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.