summaryrefslogtreecommitdiff
path: root/gnulib-tool.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-07-29 16:35:28 +0200
committerBruno Haible <bruno@clisp.org>2022-07-29 16:35:28 +0200
commitf00ef30ee0a68bf91cfd081afc784cb8ffd00656 (patch)
tree4a03672a6e133c7a3bf309eeb2a676854222dece /gnulib-tool.py
parent7d56b9e140fcabdbc944a65f18b9a0d5f6a4aabb (diff)
downloadgnulib-f00ef30ee0a68bf91cfd081afc784cb8ffd00656.tar.gz
gnulib-tool.py: Use mainstream coding style.
* gnulib-tool.py: Clarify the coding style. Fix some pycodestyle warnings. * pygnulib/constants.py: Likewise. * pygnulib/GLEmiter.py: Likewise. * pygnulib/GLImport.py: Likewise. * pygnulib/GLMakefileTable.py: Likewise.
Diffstat (limited to 'gnulib-tool.py')
-rwxr-xr-xgnulib-tool.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnulib-tool.py b/gnulib-tool.py
index f81501b9c0..860487a934 100755
--- a/gnulib-tool.py
+++ b/gnulib-tool.py
@@ -19,6 +19,13 @@
# This program is meant for authors or maintainers which want to import
# modules from gnulib into their packages.
+# CODING STYLE for this file and its companions:
+# Like PEP 8 <https://peps.python.org/pep-0008/>, except
+# - Line length is not limited to 79 characters.
+# - Line breaking before or after binary operators? Better before, like in GNU.
+# You can use this command to check the style:
+# $ pycodestyle --max-line-length=128 --ignore=E265,W503,E241,E711,E712 gnulib-tool.py pygnulib/*.py
+
#===============================================================================
# Define global imports
@@ -993,8 +1000,7 @@ if __name__ == '__main__':
with codecs.open(tempname, 'wb', 'UTF-8') as file:
file.write(incompatibilities)
sed_table = 's,^\\([^ ]*\\) ,\\1' + ' ' * 51 + ',\n'
- sed_table += 's,^\\(' + '.' * 49 + \
- '[^ ]*\) *,' + ' ' * 17 + '\\1 ,'
+ sed_table += 's,^\\(' + '.' * 49 + '[^ ]*\\) *,' + ' ' * 17 + '\\1 ,'
args = ['sed', '-e', sed_table, tempname]
incompatibilities = sp.check_output(
args).decode(ENCS['default'])