summaryrefslogtreecommitdiff
path: root/plugins/externaltools/tools/library.py
diff options
context:
space:
mode:
authorPatrick Monnerat <[email protected]>2019-05-10 16:26:39 +0200
committerraveit65 <[email protected]>2019-05-21 09:36:44 +0200
commite88a2ea8adb4a57c9cf5c44fe30c210c8608361b (patch)
treea70133a625b31710d79dc5fdd77589b69e24c003 /plugins/externaltools/tools/library.py
parent676669e4e87130f639e118671d754a5e538f191c (diff)
downloadpluma-e88a2ea8adb4a57c9cf5c44fe30c210c8608361b.tar.bz2
pluma-e88a2ea8adb4a57c9cf5c44fe30c210c8608361b.tar.xz
Reindent all Python sources to ts=4. Strip trailing spaces.
Diffstat (limited to 'plugins/externaltools/tools/library.py')
-rwxr-xr-xplugins/externaltools/tools/library.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py
index b4e6924e..186c33f2 100755
--- a/plugins/externaltools/tools/library.py
+++ b/plugins/externaltools/tools/library.py
@@ -286,64 +286,80 @@ class Tool(object):
applicability = self._properties.get('Applicability')
if applicability: return applicability
return 'all'
+
def set_applicability(self, value):
self._set_property_if_changed('Applicability', value)
+
applicability = property(get_applicability, set_applicability)
def get_name(self):
name = self._properties.get('Name')
if name: return name
return os.path.basename(self.filename)
+
def set_name(self, value):
self._set_property_if_changed('Name', value)
+
name = property(get_name, set_name)
def get_shortcut(self):
shortcut = self._properties.get('Shortcut')
if shortcut: return shortcut
return None
+
def set_shortcut(self, value):
self._set_property_if_changed('Shortcut', value)
+
shortcut = property(get_shortcut, set_shortcut)
def get_comment(self):
comment = self._properties.get('Comment')
if comment: return comment
return self.filename
+
def set_comment(self, value):
self._set_property_if_changed('Comment', value)
+
comment = property(get_comment, set_comment)
def get_input(self):
input = self._properties.get('Input')
if input: return input
return 'nothing'
+
def set_input(self, value):
self._set_property_if_changed('Input', value)
+
input = property(get_input, set_input)
def get_output(self):
output = self._properties.get('Output')
if output: return output
return 'output-panel'
+
def set_output(self, value):
self._set_property_if_changed('Output', value)
+
output = property(get_output, set_output)
def get_save_files(self):
save_files = self._properties.get('Save-files')
if save_files: return save_files
return 'nothing'
+
def set_save_files(self, value):
self._set_property_if_changed('Save-files', value)
+
save_files = property(get_save_files, set_save_files)
def get_languages(self):
languages = self._properties.get('Languages')
if languages: return languages
return []
+
def set_languages(self, value):
self._set_property_if_changed('Languages', value)
+
languages = property(get_languages, set_languages)
def has_hash_bang(self):
@@ -358,7 +374,6 @@ class Tool(object):
for line in fp:
if line.strip() == '':
continue
-
return line.startswith('#!')
# There is no property for this one because this function is quite
@@ -404,7 +419,6 @@ class Tool(object):
def save_with_script(self, script):
filename = self.library.get_full_path(self.filename, 'w')
-
fp = open(filename, 'w', 1)
# Make sure to first print header (shebang, modeline), then