GithubHelp home page GithubHelp logo

Comments (4)

sinancepel avatar sinancepel commented on April 19, 2024 1

The easiest thing to do would be to create a symbolic link to your script with a .py extension. Right now, the .py and .pyi extensions are necessary for pyre to analyze a file, so it's not possible to check the script directly. Assuming you're in a UNIX environment, running ln my_script my_script.py and pyre check should do the trick.

from pyre-check.

SamChou19815 avatar SamChou19815 commented on April 19, 2024 1

Looks like is has been implemented now. You can configure "extensions" in .pyre_configuration. See https://pyre-check.org/docs/configuration.html

from pyre-check.

akdor1154 avatar akdor1154 commented on April 19, 2024

Thanks for the workaround. :) However my question was a bit tongue in cheek - i should probably have phrased it as a direct feature request.

from pyre-check.

dark avatar dark commented on April 19, 2024

@akdor1154 The reason for which Pyre analyzes only .py files is because it operates on directories, and we try and follow the module discovery algorithm that the Python runtime uses: https://docs.python.org/3.6/tutorial/modules.html
Trying to autodetect files with a python shebang in a given directory could be counterintuitive for the user, as that is not the behavior of the runtime.

That said, I agree that it is sometime useful to type-check Python files that are not modules - e.g. configuration files written in Python, that might not have a .py extension. I think the best way would be specifying these files on the pyre commandline - that's a reasonable feature request.

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.