diff options
author | Justin Chadwell <justin.chadwell@arm.com> | 2019-08-27 09:43:47 +0100 |
---|---|---|
committer | Justin Chadwell <justin.chadwell@arm.com> | 2019-09-10 09:25:12 +0100 |
commit | 40b06510f29058215b7774806c6cc3921cd55e5b (patch) | |
tree | e721667b1ce8f5faff17fb111aa3ac113e8d7ea6 /.editorconfig | |
parent | 44e8d5ebc36950943d70f3517d7756e210fc42ab (diff) | |
download | arm-trusted-firmware-40b06510f29058215b7774806c6cc3921cd55e5b.tar.gz |
Add python configuration for editorconfig
As it currently is, python files are formatted using the general rules
in .editorconfig - this means that 8-character hard tabs are used, which
is not the recommended behaviour according to the PEP-8 standard. This
patch correct this, and additionally limits the line length to 79
characters as required by the standard.
Change-Id: I3b5c0aff12034c4184d4555aab36490cdb3885da
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Diffstat (limited to '.editorconfig')
-rw-r--r-- | .editorconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig index 928c30705..b14e0253b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,6 +11,8 @@ # [CONT] contributing.rst # [LCS] Linux Coding Style # (https://www.kernel.org/doc/html/v4.10/process/coding-style.html) +# [PEP8] Style Guide for Python Code +# (https://www.python.org/dev/peps/pep-0008) root = true @@ -60,3 +62,14 @@ max_line_length = 180 # 180 only selected to prevent changes to existing text. tab_width = 4 + +# Adjustment for python which prefers a different style +[*.py] +# [PEP8] Indentation +# "Use 4 spaces per indentation level." +indent_size = 4 +indent_style = space + +# [PEP8] Maximum Line Length +# "Limit all lines to a maximum of 79 characters." +max_line_length = 79 |