Skip to content

Commit

Permalink
autopep8 aggressive
Browse files Browse the repository at this point in the history
see #4
  • Loading branch information
thorade committed Nov 14, 2017
1 parent eab5ed3 commit c0d59c7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CoTeTo/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def closeEvent(self, e):
c.set(p, 'generator', generator)
with open(c.path, 'w') as configfile:
c.write(configfile)
except:
except BaseException:
# silently ignore errors
# FIXME: is this a good idea? But where should the errors appear?
pass
Expand Down
3 changes: 1 addition & 2 deletions CoTeTo/Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ def executeFilter(self):

def executeTemplates(self):
"""execeute all templates, return the output buffers and extensions"""
tmpls = [s for s in self.cfg.sections() if s.upper().startswith('TEMPLATE')]
tmpls.sort() # execute template sections in alphabetical order
tmpls = sorted([s for s in self.cfg.sections() if s.upper().startswith('TEMPLATE')])
txt = {}
for tmpl in tmpls:
ext = self.cfg[tmpl].get('ext', '')
Expand Down
4 changes: 2 additions & 2 deletions CoTeTo/Loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, systemCfg, generatorCfg, logger):
self.logger.debug('LDR | creating instance of loader %s' % self.name)
try:
self.setup()
except:
except BaseException:
self.logger.exception('LDR | error during setup')

def setup(self):
Expand All @@ -61,7 +61,7 @@ def execute(self, uriList):
self.logger.debug('LDR | executing loader %s with uriList: %s' % (self.name, uriList))
try:
return self.load(uriList)
except:
except BaseException:
self.logger.exception('LDR | error during execution/load')

# make class callable
Expand Down
2 changes: 1 addition & 1 deletion Generators/TestJinja2/Filters/Filter01.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def filter01(d, systemCfg, generatorCfg, logger):

# spread a message
logger.debug('hi there! This is a filter running from module: '+__file__)
logger.debug('hi there! This is a filter running from module: ' + __file__)

x = d['dummy']

Expand Down
2 changes: 1 addition & 1 deletion Generators/TestMako/Filters/Filter01.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def filter01(d, systemCfg, generatorCfg, logger):

# spread a message
logger.debug('hi there! This is a filter running from module: '+__file__)
logger.debug('hi there! This is a filter running from module: ' + __file__)

x = d['dummy']

Expand Down
6 changes: 3 additions & 3 deletions tools/dependency_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def done(status=0):
try:
from mako.template import Template
l.append('Ok!')
except:
except BaseException:
l.append('- Please install mako and retry (pip install mako)!')
lb.append(l)

Expand All @@ -51,7 +51,7 @@ def done(status=0):
try:
from jinja2 import Environment
l.append('Ok!')
except:
except BaseException:
l.append('- Please install jinja2 and retry (pip install jinja2)!')
lb.append(l)

Expand All @@ -60,7 +60,7 @@ def done(status=0):
try:
from PyQt5 import QtGui
l.append('Ok!')
except:
except BaseException:
l.append('- GUI will not run, please install PyQt5 and retry!')
lb.append(l)

Expand Down

0 comments on commit c0d59c7

Please sign in to comment.