Did I find the right examples for you? yes no

All Samples(76)  |  Call(50)  |  Derive(0)  |  Import(26)
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.

Returns a list of CodeUnit objects.

        def code_unit_factory(morfs, file_locator):
    """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.

    Returns a list of CodeUnit objects.

    """
    # Be sure we have a list.
    if not isinstance(morfs, (list, tuple)):
        morfs = [morfs]

    # On Windows, the shell doesn't expand wildcards.  Do it here.
    globbed = []
    for morf in morfs:
        if isinstance(morf, string_class) and ('?' in morf or '*' in morf):
            globbed.extend(glob.glob(morf))
        else:
            globbed.append(morf)
    morfs = globbed

    code_units = [CodeUnit(morf, file_locator) for morf in morfs]

    return code_units
        


src/k/i/kitsune-HEAD/vendor/packages/coverage/coverage/report.py   kitsune(Download)
"""Reporter foundation for Coverage."""
 
import os
from coverage.codeunit import code_unit_factory
from coverage.misc import CoverageException, NoSource
        morfs = morfs or self.coverage.data.executed_files()
        self.code_units = code_unit_factory(
                            morfs, self.coverage.file_locator, omit_prefixes)
        self.code_units.sort()
 

src/k/u/kuma-lib-HEAD/packages/coverage/coverage/report.py   kuma-lib(Download)
"""Reporter foundation for Coverage."""
 
import os
from coverage.codeunit import code_unit_factory
from coverage.misc import CoverageException, NoSource
        morfs = morfs or self.coverage.data.executed_files()
        self.code_units = code_unit_factory(
                            morfs, self.coverage.file_locator, omit_prefixes)
        self.code_units.sort()
 

src/c/o/coveragepy-HEAD/coverage/control.py   coveragepy(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems
from coverage.codeunit import code_unit_factory, CodeUnit, PythonCodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        self._harvest_data()
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/m/i/microblog-HEAD/flask/lib/python2.7/site-packages/coverage/control.py   microblog(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted  # pylint: disable=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        self._harvest_data()
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/c/o/coverage-3.7.1/coverage/control.py   coverage(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted  # pylint: disable=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        self._harvest_data()
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/n/o/noc-0.7(3)/contrib/src/coverage/coverage/control.py   noc(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        """
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/r/o/rolf-HEAD/ve/lib/python2.7/site-packages/coverage/control.py   rolf(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        """
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/coverage/control.py   antisocial(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        """
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/k/i/kitsune-HEAD/vendor/packages/coverage/coverage/control.py   kitsune(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class          # pylint: disable-msg=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.data import CoverageData
        """
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/coverage/control.py   nupic-linux64(Download)
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted  # pylint: disable=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
        self._harvest_data()
        if not isinstance(it, CodeUnit):
            it = code_unit_factory(it, self.file_locator)[0]
 
        return Analysis(self, it)

  1 | 2 | 3  Next