--- /dev/null
+all: lint
+
+lint:
+ # Analyze code
+ # don't show recommendations, info, comments, report
+ # W0613 - unused argument
+ # Ignore cherrypy class members as they are dynamically added
+ pylint -d c,r,i,W0613 -r n -f colorized \
+ --notes= \
+ --ignored-classes=cherrypy \
+ ./ipsilon
return conf
- def _get_user_preferences(self, user):
+ def get_user_preferences(self, user):
path = None
if 'user.prefs.db' in cherrypy.config:
path = cherrypy.config['user.prefs.db']
self._env = template_env
self.basepath = cherrypy.config.get('base.mount', "")
self.username = None
+ self.user = None
def __call__(self, *args, **kwargs):
+ # pylint: disable=star-args
self.username = cherrypy.session.get('user', None)
self.user = User(self.username)
try:
if ext.lower() == '.py':
mod = imp.load_source(name, file_name)
- elif ex.lower() == '.pyc':
+ elif ext.lower() == '.pyc':
mod = imp.load_compiled(name, file_name)
else:
return
- except Exception, e:
+ except Exception, e: # pylint: disable=broad-except
cherrypy.log.error('Failed to load "%s" module: [%s]' % (name, e))
return
files = None
try:
files = os.listdir(path)
- except Exception, e:
+ except Exception, e: # pylint: disable=broad-except
cherrypy.log.error('No modules in %s: [%s]' % (path, e))
return
for name in files:
- filename = od.path.join(path, name)
+ filename = os.path.join(path, name)
self._load_class(tree, class_type, filename)
def get_providers(self):
return self._providers_tree
- def get_custom(self, class_type):
+ def get_custom(self, path, class_type):
tree = []
- self._load_classes(tree, class_type)
+ self._load_classes(tree, path, class_type)
return tree