summaryrefslogtreecommitdiff
path: root/pygnulib/GLFileSystem.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-08-04 21:53:51 +0200
committerBruno Haible <bruno@clisp.org>2022-08-04 22:19:36 +0200
commit362f779b9df810f67c2f32afc0cd8c0707862a8a (patch)
tree92d3a72255b336aca0dfeb5ddd5cfbcd527143e0 /pygnulib/GLFileSystem.py
parent895f7af02c482e218745550c87e77d21d5aaaa25 (diff)
downloadgnulib-362f779b9df810f67c2f32afc0cd8c0707862a8a.tar.gz
gnulib-tool.py: Coding style: Revisit line breaks.
* gnulib-tool.py: Avoid line breaks at arbitrary points inside expressions. Use line breaks to clarify [... for ...] iterations. * pygnulib/*.py: Likewise.
Diffstat (limited to 'pygnulib/GLFileSystem.py')
-rw-r--r--pygnulib/GLFileSystem.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/pygnulib/GLFileSystem.py b/pygnulib/GLFileSystem.py
index a1d1520f7c..7bec0f9e6e 100644
--- a/pygnulib/GLFileSystem.py
+++ b/pygnulib/GLFileSystem.py
@@ -191,8 +191,8 @@ class GLFileAssistant(object):
Return the name of a temporary file (file is relative to destdir).'''
if type(path) is not str:
- raise TypeError(
- 'path must be a string, not %s' % (type(path).__name__))
+ raise TypeError('path must be a string, not %s'
+ % (type(path).__name__))
if not self.config['dryrun']:
# Put the new contents of $file in a file in the same directory (needed
# to guarantee that an 'mv' to "$destdir/$file" works).
@@ -215,8 +215,8 @@ class GLFileAssistant(object):
Set the name of the original file which will be used.'''
if type(original) is not str:
- raise TypeError(
- 'original must be a string, not %s' % (type(original).__name__))
+ raise TypeError('original must be a string, not %s'
+ % (type(original).__name__))
self.original = original
def setRewritten(self, rewritten):
@@ -224,8 +224,8 @@ class GLFileAssistant(object):
Set the name of the rewritten file which will be used.'''
if type(rewritten) is not str:
- raise TypeError(
- 'rewritten must be a string, not %s' % type(rewritten).__name__)
+ raise TypeError('rewritten must be a string, not %s'
+ % type(rewritten).__name__)
self.rewritten = rewritten
def addFile(self, file):
@@ -263,8 +263,7 @@ class GLFileAssistant(object):
print('Copying file %s' % rewritten)
if self.filesystem.shouldLink(original, lookedup) == CopyAction.Symlink \
and not tmpflag and filecmp.cmp(lookedup, tmpfile):
- constants.link_if_changed(
- lookedup, joinpath(destdir, rewritten))
+ constants.link_if_changed(lookedup, joinpath(destdir, rewritten))
else: # if any of these conditions is not met
try: # Try to move file
movefile(tmpfile, joinpath(destdir, rewritten))
@@ -348,8 +347,7 @@ class GLFileAssistant(object):
sed_transform_lib_file = self.transformers.get('lib', '')
sed_transform_build_aux_file = self.transformers.get('aux', '')
sed_transform_main_lib_file = self.transformers.get('main', '')
- sed_transform_testsrelated_lib_file = self.transformers.get(
- 'tests', '')
+ sed_transform_testsrelated_lib_file = self.transformers.get('tests', '')
try: # Try to copy lookedup file to tmpfile
copyfile(lookedup, tmpfile)
except Exception as error: