GithubHelp home page GithubHelp logo

thisfred / star-destroyer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zestyping/star-destroyer

0.0 3.0 0.0 28 KB

Eliminates "import *" from your modules.

License: Apache License 2.0

Python 100.00%

star-destroyer's Introduction

star_destroyer: Eliminate import * from your modules

To run this over your code, provide the root path to your files, like so:

python -m star_destroyer /path/to/files

This would scan all *.py files anywhere under /path/to/files. The path you provide should be a path as it would appear in sys.path -- thus, if you want to process a package, provide the path to the parent of the package directory, not the package directory itself.

Running with just a path will print out the results of the scan and the edits that would be made, without actually performing the edits. If you want star_destroyer to actually edit your files to replace all the import * statements, run it with the -e option, like so:

python -m star_destroyer -e /path/to/files

star_destroyer has been tested with Python 2.7 and Python 3.5. Run it using the same version of Python that your code is written for. PYTHONPATH should also be set as it would be set during a normal run of your code; it will be used to find other modules that your code imports.

To run the tests, execute py.test using Python 2.7 or Python 3.5.

star-destroyer's People

Contributors

zestyping avatar

Watchers

 avatar  avatar  avatar

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.