summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-12-16 21:15:55 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-12-16 21:15:55 -0500
commit2ccdbbd9c205ca33757b9210e0168603088333a5 (patch)
treefc1840290d43e0b8e680366730fb9d551db68e07 /coverage
parentb290d2cf78872c4cd514a215fba2da7de87bccbf (diff)
downloadpython-coveragepy-2ccdbbd9c205ca33757b9210e0168603088333a5.tar.gz
Clean up and credit the #265 work
Diffstat (limited to 'coverage')
-rw-r--r--coverage/config.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/coverage/config.py b/coverage/config.py
index f3e296c..287844b 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -368,7 +368,6 @@ class CoverageConfig(object):
Returns the value of the option.
"""
-
# Check all the hard-coded options.
for option_spec in self.CONFIG_FILE_OPTIONS:
attr, where = option_spec[:2]
@@ -384,10 +383,9 @@ class CoverageConfig(object):
raise CoverageException("No such option: %r" % option_name)
def sanity_check(self):
- if ((self.source is not None) and
- (self.include is not None)):
- raise CoverageException(
- "--include and --source are mutually exclusive")
+ """Check interactions among settings, and raise if there's a problem."""
+ if (self.source is not None) and (self.include is not None):
+ raise CoverageException("--include and --source are mutually exclusive")
def read_coverage_config(config_file, **kwargs):
@@ -446,5 +444,5 @@ def read_coverage_config(config_file, **kwargs):
config.from_args(**kwargs)
config.sanity_check()
-
+
return config_file, config