Skip to content

a code formatter indenting function and method definitions twice

License

Notifications You must be signed in to change notification settings

jkittner/double-indent

Repository files navigation

ci pre-commit.ci status

double-indent

A code formatter to add double indentation to function and method definitions.

Installation

pip install double-indent

usage

usage: double-indent [-h] [-i INDENT] [filenames ...]

positional arguments:
  filenames

optional arguments:
  -h, --help            show this help message and exit
  -i INDENT, --indent INDENT
                        number of spaces for indentation

pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

- repo: https://github.com/jkittner/double-indent
  rev: 0.1.5
  hooks:
    - id: double-indent

indent function and method definitions twice

 def func(
-    arg,
-    arg2,
+        arg,
+        arg2,
 ):
     ...
 class C:
     def __init__(
-        self,
-        arg,
+            self,
+            arg,
     ):
         ...

About

a code formatter indenting function and method definitions twice

Topics

Resources

License

Stars

Watchers

Forks

Languages