/double-indent

a code formatter indenting function and mtehod definitions twice

Primary LanguagePythonMIT LicenseMIT

double-indent-rotki

A code formatter to add double indentation to function and method definitions. Original repository: https://github.com/theendlessriver13/double-indent/

We forked it to add additional functionality that the original author did not want to include upstream: jkittner#19

Installation

pip install double-indent-rotki

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
  --dry-run             do not modify anything, just print if any file would have changes

indent function and method definitions twice

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