Code Monkey home page Code Monkey logo

autohooks-plugin-isort's Introduction

Greenbone Logo

autohooks-plugin-isort

PyPI release

An autohooks plugin for Python code formatting via isort.

Installation

Install using pip

You can install the latest stable release of autohooks-plugin-isort from the Python Package Index using pip:

pip install autohooks-plugin-isort

Note the pip refers to the Python 3 package manager. In a environment where Python 2 is also available the correct command may be pip3.

Install using poetry

It is highly encouraged to use poetry for maintaining your project's dependencies. Normally autohooks-plugin-isort is installed as a development dependency.

poetry install

Usage

To activate the isort autohooks plugin please add the following setting to your pyproject.toml file.

[tool.autohooks]
pre-commit = ["autohooks.plugins.isort"]

By default, autohooks plugin isort checks all files with a .py ending. If only the imports of files in a sub-directory or files with different endings should be sorted, just add the following setting:

[tool.autohooks]
pre-commit = ["autohooks.plugins.isort"]

[tool.autohooks.plugins.isort]
include = ['foo/*.py', '*.foo']

When using autohooks-plugins-isort in combination with autohooks-plugin-black, the following configuration is recommended to ensure a consistent formatting:

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 80

Maintainer

This project is maintained by Greenbone Networks GmbH.

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.

License

Copyright (C) 2019 Greenbone Networks GmbH

Licensed under the GNU General Public License v3.0 or later.

autohooks-plugin-isort's People

Contributors

bjoernricks avatar dependabot-preview[bot] avatar dependabot[bot] avatar wiegandm avatar y0urself 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.