Showing 2 of 5 files from the diff.

@@ -21,6 +21,7 @@
Loading
21 21
class Loader(yaml.SafeLoader):
22 22
    def __init__(self, stream):
23 23
        self._root = os.path.split(stream.name)[0]
24 +
        self._cache = dict()
24 25
        super(Loader, self).__init__(stream)
25 26
26 27
    def from_yaml(self, node):
@@ -57,8 +58,11 @@
Loading
57 58
        path = os.path.join(self._root, filename)
58 59
59 60
        # Load the other YAML document
60 -
        with open(path, 'r') as f:
61 -
            doc = yaml.load(f, self.__class__)
61 +
        doc = self._cache.get(path)
62 +
        if not doc:
63 +
            with open(path, 'r') as f:
64 +
                doc = yaml.load(f, self.__class__)
65 +
                self._cache[path] = doc
62 66
63 67
        # Retrieve the key
64 68
        try:
@@ -328,7 +332,7 @@
Loading
328 332
329 333
def load_config(path):
330 334
    try:
331 -
        with open(path) as f:
335 +
        with open(path, 'r') as f:
332 336
            data = yaml.load(f, Loader)
333 337
    except IOError as e:
334 338
        raise ConfigError('Error opening {}: {}'.format(SCUBA_YML, e))

@@ -1,7 +1,9 @@
Loading
1 1
# Python 2/3 compatibility
2 2
import subprocess
3 +
import sys
3 4
4 5
__all__ = [
6 +
    'builtins_module_name',
5 7
    'File',
6 8
    'StringIO',
7 9
]
@@ -28,3 +30,10 @@
Loading
28 30
    # 'file' type removed, but open() returns _io.TextIOWrapper
29 31
    # which has a __dict__
30 32
    File = open
33 +
34 +
35 +
# https://stackoverflow.com/a/9047762
36 +
if sys.version_info >= (3,):
37 +
    builtins_module_name = 'builtins'
38 +
else:
39 +
    builtins_module_name = '__builtin__'
Files Coverage
scuba 95.03%
Project Totals (9 files) 95.03%
504.2
3.5=.5
TRAVIS_OS_NAME=linux
504.1
TRAVIS_OS_NAME=linux
2.7=.7

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading