Changeset - 27c4ad3e584f
[Not reviewed]
default
0 3 0
Mads Kiilerich - 6 years ago 2020-02-09 19:42:16
mads@kiilerich.com
Grafted from: 516ded906eab
cleanup: trivial fixes for some pyflakes warnings
3 files changed with 4 insertions and 10 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -30,13 +30,13 @@ import logging
 
import traceback
 
from collections import OrderedDict, defaultdict
 

	
 
from tg import request, response
 
from tg import tmpl_context as c
 
from tg.i18n import ugettext as _
 
from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPFound, HTTPNotFound
 
from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPNotFound
 

	
 
import kallithea.lib.helpers as h
 
from kallithea.lib import diffs
 
from kallithea.lib.auth import HasRepoPermissionLevelDecorator, LoginRequired
 
from kallithea.lib.base import BaseRepoController, jsonify, render
 
from kallithea.lib.graphmod import graph_data
kallithea/lib/vcs/utils/imports.py
Show inline comments
 
from kallithea.lib.vcs.exceptions import VCSError
 

	
 

	
 
def import_class(class_path):
 
    """
 
    Returns class from the given path.
 

	
 
    For example, in order to get class located at
 
    ``vcs.backends.hg.MercurialRepository``:
 

	
 
        try:
 
            hgrepo = import_class('vcs.backends.hg.MercurialRepository')
 
        except VCSError:
 
            # handle error
 
        hgrepo = import_class('vcs.backends.hg.MercurialRepository')
 
    """
 
    splitted = class_path.split('.')
 
    mod_path = '.'.join(splitted[:-1])
 
    class_name = splitted[-1]
 
    class_mod = __import__(mod_path, {}, {}, [class_name])
 
    cls = getattr(class_mod, class_name)
setup.py
Show inline comments
 
@@ -109,14 +109,14 @@ keywords = ' '.join([
 
# long description
 
README_FILE = 'README.rst'
 
try:
 
    long_description = open(README_FILE).read()
 
except IOError as err:
 
    sys.stderr.write(
 
        "[WARNING] Cannot find file specified as long_description (%s)\n"
 
        % README_FILE
 
        "[WARNING] Cannot find file specified as long_description (%s): %s\n"
 
        % (README_FILE, err)
 
    )
 
    long_description = description
 

	
 

	
 
sdist_org = sdist.sdist
 
class sdist_new(sdist_org):
0 comments (0 inline, 0 general)