Giter VIP home page Giter VIP logo

blackdwarf's Introduction

BlackDwarf

BlackDwarf is a Python script that eliminates wildcard imports, also known as "star imports", from a provided target file. The script uses the ast module to parse and analyze the target file, and then replaces wildcard imports with specific imports, making the code more readable and maintainable. The script also has options for dry-run mode, prefixing output, and inferring imports.

Usage

usage: blackdwarf [-m] [-d] [-i] [-nf] target

positional arguments:
  target                The directory to be processed

optional arguments:
  -m,  --module          The module to be processed
  -d,  --dry-run         Dry run mode - No changes will be applied to disk
  -i,  --infer-imports   Disable inference of imports in situations where a file lacks `__all__`
  -nf, --no-format       Disable formatting of the output file
  -ca, --create-all      Create `__all__` if it does not exist

blackdwarf's People

Contributors

lordofpolls 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.