From 7731aa77ce89806187bfccdbcd5c13f624ca36bf Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Wed, 23 Jul 2008 17:43:36 +0200 Subject: [PATCH] gitstats: Replace check_file with checkFile To be consistent with the naming conventions everywhere the name should be camelCase and not in dashed_form. --- src/git_stats/author.py | 2 +- src/git_stats/commit.py | 2 +- src/git_stats/parse.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/git_stats/author.py b/src/git_stats/author.py index 769330d..8a679de 100644 --- a/src/git_stats/author.py +++ b/src/git_stats/author.py @@ -241,7 +241,7 @@ def _checkOptions(parser, options): if options.file: try: - parse.check_file(value=options.file, relative=options.relative) + parse.checkFile(value=options.file, relative=options.relative) except OptionValueError, e: parser.error(e) diff --git a/src/git_stats/commit.py b/src/git_stats/commit.py index be91e3e..af3b7d5 100644 --- a/src/git_stats/commit.py +++ b/src/git_stats/commit.py @@ -289,7 +289,7 @@ def _checkOptions(parser, options): else: # Check if the specified file is valid try: - parse.check_file(value=options.touched, relative=options.relative) + parse.checkFile(value=options.touched, relative=options.relative) except OptionValueError, e: parser.error(e) diff --git a/src/git_stats/parse.py b/src/git_stats/parse.py index 3dce95b..55ed3fb 100644 --- a/src/git_stats/parse.py +++ b/src/git_stats/parse.py @@ -5,14 +5,14 @@ import copy from git import Repo from optparse import OptionParser, Option, OptionValueError -def _check_file(option, opt, value): +def _checkFile(option, opt, value): """Checks whether value is a valid file and returns it if so """ - return check_file(value) + return checkFile(value) -def check_file(value, relative=False): +def checkFile(value, relative=False): """Check whether value is a valid file and returns it if so Args: @@ -79,7 +79,7 @@ class GitOption(Option): # Add our own options TYPE_CHECKER["commit"] = _check_commit - TYPE_CHECKER["file"] = _check_file + TYPE_CHECKER["file"] = _checkFile TYPE_CHECKER["bool"] = _check_bool def isUnique(options, atLeastOne=False): -- 2.11.4.GIT