Skip to main content

a code formatter indenting function and method definitions twice

Project description

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,
     ):
         ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

double_indent-0.1.5.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

double_indent-0.1.5-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file double_indent-0.1.5.tar.gz.

File metadata

  • Download URL: double_indent-0.1.5.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.19

File hashes

Hashes for double_indent-0.1.5.tar.gz
Algorithm Hash digest
SHA256 50d89b34a21e116b760f11211d96b4f802c3aaba82e2bbab3a5f0d72844a645e
MD5 a5076873d8f171de46cb0443f5145c1a
BLAKE2b-256 926b4df90e44fd48469501b0a36d27dbc2dce3d32465081f44b5e3ad8d42265c

See more details on using hashes here.

File details

Details for the file double_indent-0.1.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for double_indent-0.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9507d4698da854312655134ce3a0f1863a9834d4b67fbd6027654801bf39245d
MD5 d6ce30783e2a45fea0098509e0b468ba
BLAKE2b-256 b1ed39089461bdad6ce3e148a517a3794f987cf7bb216a156c03111ef4945c29

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page