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
 
@@ -24,25 +24,25 @@ Original author and date, and relevant c
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import binascii
 
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
 
from kallithea.lib.utils import action_logger
 
from kallithea.lib.utils2 import ascii_str, safe_str
 
from kallithea.lib.vcs.backends.base import EmptyChangeset
 
from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError, EmptyRepositoryError, RepositoryError
 
from kallithea.model.changeset_status import ChangesetStatusModel
 
from kallithea.model.comment import ChangesetCommentsModel
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)
 
    return cls
setup.py
Show inline comments
 
@@ -103,26 +103,26 @@ description = ('Kallithea is a fast and 
 
keywords = ' '.join([
 
    'kallithea', 'mercurial', 'git', 'code review',
 
    'repo groups', 'ldap', 'repository management', 'hgweb replacement',
 
    'hgwebdir', 'gitweb replacement', 'serving hgweb',
 
])
 

	
 
# 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):
 
    def initialize_options(self):
 
        sdist_org.initialize_options(self)
 
        self.owner = self.group = 'root'
 
sdist.sdist = sdist_new
 

	
 
packages = setuptools.find_packages(exclude=['ez_setup'])
0 comments (0 inline, 0 general)