GithubHelp home page GithubHelp logo

Comments (5)

dkgi avatar dkgi commented on April 20, 2024 1

@llimllib: thanks for trying out Pyre :)

The error you're getting means that Pyre does not know about boto3. Pyre has various ways of knowing about third-party libraries. A lot of them are defined in typeshed, which is shipped with Pyre itself. Apart from that you can tell Pyre where to look for them, e.g. by adding

"search_path": ["where/to/find/additional/python/files/or/stubs"],

to your .pyre_configuration. You can also pass this with --search-path or tell python to use your current $PYTHONPATH during the lookup (with --preserve-pythonpath).

Unfortunately, all of those options are currently not very well documented, see also #10

from pyre-check.

dkgi avatar dkgi commented on April 20, 2024 1

Anyway, here's a vote for making --preserve-pythonpath the default, who would not want that on?

We usually have lots of developers working on the same codebase. Getting them all to have a consistent environment setup on their machines is very difficult so we usually rely on storing a consistent set of options in a configuration file that is shared by everybody.

from pyre-check.

JelleZijlstra avatar JelleZijlstra commented on April 20, 2024 1

Would it make more sense to have unimported modules default to evaluating to Any? That's the behavior I usually choose with mypy (--follow-imports=silent is the relevant option I believe), and I think that's generally the sensible behavior if you're using libraries that don't have stubs available.

from pyre-check.

llimllib avatar llimllib commented on April 20, 2024

Ah! thanks for the quick response, I guess I'm surprised that a type checker is concerned about whether boto3 actually exists or not.

Anyway, here's a vote for making --preserve-pythonpath the default, who would not want that on?

from pyre-check.

llimllib avatar llimllib commented on April 20, 2024

Maybe the default if there is no config file? Anyway, I found the error very confusing so I suspect others new to the project will too.

Thanks for your hard work on the tool, Iā€™m using it because im excited for it.

from pyre-check.

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.