mirror of
https://github.com/ejwa/gitinspector.git
synced 2025-03-26 02:01:27 +01:00
Resolving pylint R0205 warnings
This commit is contained in:
parent
7b9d394791
commit
e89631028e
10 changed files with 16 additions and 15 deletions
3
Makefile
3
Makefile
|
@ -34,7 +34,8 @@ clean-test: ## remove test and coverage artifacts
|
|||
rm -f .coverage
|
||||
rm -fr .pytest_cache
|
||||
|
||||
lint: ## check style with flake8
|
||||
lint: ## check style with flake8 and pylint
|
||||
pylint --rcfile=.pylintrc gitinspector
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 gitinspector tests --count --select=E9,F63,F7,F82 --show-source --statistics --builtins="_"
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
|
|
|
@ -30,7 +30,7 @@ from . import comment, extensions, filtering, format, interval, terminal
|
|||
NUM_THREADS = multiprocessing.cpu_count()
|
||||
|
||||
|
||||
class BlameEntry(object):
|
||||
class BlameEntry():
|
||||
rows = 0
|
||||
skew = 0 # Used when calculating average code age.
|
||||
comments = 0
|
||||
|
@ -127,7 +127,7 @@ class BlameThread(threading.Thread):
|
|||
PROGRESS_TEXT = N_("Checking how many rows belong to each author (2 of 2): {0:.0f}%")
|
||||
|
||||
|
||||
class Blame(object):
|
||||
class Blame():
|
||||
def __init__(self, repo, hard, useweeks, changes):
|
||||
self.blames = {}
|
||||
ls_tree_p = subprocess.Popen(
|
||||
|
|
|
@ -34,7 +34,7 @@ __thread_lock__ = threading.BoundedSemaphore(NUM_THREADS)
|
|||
__changes_lock__ = threading.Lock()
|
||||
|
||||
|
||||
class FileDiff(object):
|
||||
class FileDiff():
|
||||
def __init__(self, string):
|
||||
commit_line = string.split("|")
|
||||
|
||||
|
@ -67,7 +67,7 @@ class FileDiff(object):
|
|||
return False
|
||||
|
||||
|
||||
class Commit(object):
|
||||
class Commit():
|
||||
def __init__(self, string):
|
||||
self.filediffs = []
|
||||
commit_line = string.split("|")
|
||||
|
@ -100,7 +100,7 @@ class Commit(object):
|
|||
return string.split("|").__len__() == 5
|
||||
|
||||
|
||||
class AuthorInfo(object):
|
||||
class AuthorInfo():
|
||||
email = None
|
||||
insertions = 0
|
||||
deletions = 0
|
||||
|
@ -198,7 +198,7 @@ class ChangesThread(threading.Thread):
|
|||
PROGRESS_TEXT = N_("Fetching and calculating primary statistics (1 of 2): {0:.0f}%")
|
||||
|
||||
|
||||
class Changes(object):
|
||||
class Changes():
|
||||
authors = {}
|
||||
authors_dateinfo = {}
|
||||
authors_by_email = {}
|
||||
|
|
|
@ -33,7 +33,7 @@ __cloned_paths__ = []
|
|||
|
||||
|
||||
def create(url):
|
||||
class Repository(object):
|
||||
class Repository():
|
||||
def __init__(self, name, location):
|
||||
self.name = name
|
||||
self.location = location
|
||||
|
|
|
@ -23,7 +23,7 @@ import subprocess
|
|||
from . import extensions, filtering, format, interval, optval
|
||||
|
||||
|
||||
class GitConfig(object):
|
||||
class GitConfig():
|
||||
def __init__(self, run, repo, global_only=False):
|
||||
self.run = run
|
||||
self.repo = repo
|
||||
|
|
|
@ -39,7 +39,7 @@ from .output.timelineoutput import TimelineOutput
|
|||
localization.init()
|
||||
|
||||
|
||||
class Runner(object):
|
||||
class Runner():
|
||||
def __init__(self):
|
||||
self.hard = False
|
||||
self.include_metrics = False
|
||||
|
|
|
@ -70,7 +70,7 @@ METRIC_CYCLOMATIC_COMPLEXITY_THRESHOLD = 50
|
|||
METRIC_CYCLOMATIC_COMPLEXITY_DENSITY_THRESHOLD = 0.75
|
||||
|
||||
|
||||
class MetricsLogic(object):
|
||||
class MetricsLogic():
|
||||
def __init__(self):
|
||||
self.eloc = {}
|
||||
self.cyclomatic_complexity = {}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
from .. import format
|
||||
|
||||
|
||||
class Outputable(object):
|
||||
class Outputable():
|
||||
def output_html(self):
|
||||
raise NotImplementedError(_("HTML output not yet supported in") + ' "' + self.__class__.__name__ + '".')
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
# along with gitinspector. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
class ResponsibiltyEntry(object):
|
||||
class ResponsibiltyEntry():
|
||||
blames = {}
|
||||
|
||||
|
||||
class Responsibilities(object):
|
||||
class Responsibilities():
|
||||
@staticmethod
|
||||
def get(blame, author_name):
|
||||
author_blames = {}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
import datetime
|
||||
|
||||
|
||||
class TimelineData(object):
|
||||
class TimelineData():
|
||||
def __init__(self, changes, useweeks):
|
||||
authordateinfo_list = sorted(changes.get_authordateinfo_list().items())
|
||||
self.changes = changes
|
||||
|
|
Loading…
Add table
Reference in a new issue