summaryrefslogtreecommitdiff
path: root/coverage/codeunit.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-05-15 23:03:52 -0400
committerNed Batchelder <ned@nedbatchelder.com>2010-05-15 23:03:52 -0400
commitf0b3451e829de7311c39a18c0fb34312330981ef (patch)
tree18d749a0434445f0316ecc7b641739b2796e268b /coverage/codeunit.py
parent4fb69b6c13c00bba910afe9d6beade673f4e4386 (diff)
downloadpython-coveragepy-git-f0b3451e829de7311c39a18c0fb34312330981ef.tar.gz
Format the code to pylint's liking, and fix up the docstrings for omit and include.
Diffstat (limited to 'coverage/codeunit.py')
-rw-r--r--coverage/codeunit.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/coverage/codeunit.py b/coverage/codeunit.py
index 6312efe2..a0da1a71 100644
--- a/coverage/codeunit.py
+++ b/coverage/codeunit.py
@@ -6,16 +6,18 @@ from coverage.backward import string_class, StringIO
from coverage.misc import CoverageException
-def code_unit_factory(morfs, file_locator, omit_prefixes=None, include_prefixes=None):
+def code_unit_factory(
+ morfs, file_locator, omit_prefixes=None, include_prefixes=None
+ ):
"""Construct a list of CodeUnits from polymorphic inputs.
`morfs` is a module or a filename, or a list of same.
+
`file_locator` is a FileLocator that can help resolve filenames.
- `omit_prefixes` is a list of prefixes. CodeUnits that match those prefixes
- will be omitted from the list.
- `include_prefixes` is a list of prefixes. Only CodeUnits that match those prefixes
- will be included in the list.
- You are required to pass at most one of `omit_prefixes` and `include_prefixes`.
+
+ `include_prefixes` is a list of prefixes. Only CodeUnits that match those
+ prefixes will be included in the list. `omit_prefixes` is a list of
+ prefixes to omit from the list.
Returns a list of CodeUnit objects.