robinhood / faust

@@ -7,6 +7,7 @@
Loading
7 7
from typing import (
8 8
    Any,
9 9
    Callable,
10 +
    Hashable,
10 11
    Iterable,
11 12
    Mapping,
12 13
    Optional,
@@ -544,7 +545,10 @@
Loading
544 545
545 546
@lru_cache(maxsize=2048)
546 547
def field_for_type(
547 -
        typ: Type) -> Tuple[Type[FieldDescriptorT], Optional[Type[Tag]]]:
548 +
        htyp: Hashable) -> Tuple[Type[FieldDescriptorT], Optional[Type[Tag]]]:
549 +
    # This is a way to make mypy >= 0.790 happy, as lru_cache
550 +
    # expects a Hashable
551 +
    typ = cast(Type, htyp)
548 552
    try:
549 553
        # 1) Check if type is in fast index.
550 554
        return TYPE_TO_FIELD[typ], None
@@ -557,7 +561,8 @@
Loading
557 561
        else:
558 562
            try:
559 563
                if origin is not None and issubclass(origin, Tag):
560 -
                    return field_for_type(typ.__args__[0])[0], typ
564 +
                    return field_for_type(
565 +
                        cast(Hashable, typ.__args__[0]))[0], typ
561 566
            except TypeError:
562 567
                pass
563 568

@@ -7,6 +7,7 @@
Loading
7 7
    Callable,
8 8
    Dict,
9 9
    FrozenSet,
10 +
    Hashable,
10 11
    List,
11 12
    Mapping,
12 13
    MutableMapping,
@@ -253,7 +254,9 @@
Loading
253 254
            else:
254 255
                target_type = typ
255 256
            if descr is None or not isinstance(descr, FieldDescriptorT):
256 -
                DescriptorType, tag = field_for_type(target_type)
257 +
                # Make mypy happy
258 +
                hashed_target_type = cast(Hashable, target_type)
259 +
                DescriptorType, tag = field_for_type(hashed_target_type)
257 260
                if tag:
258 261
                    add_to_tagged_indices(field, tag)
259 262
                descr = DescriptorType(
Files Coverage
faust 98.32%
Project Totals (99 files) 98.32%
1497.16
TRAVIS_PYTHON_VERSION=3.6.9
TRAVIS_OS_NAME=linux
IDENT=3.6.9
TOXENV=3.6
1497.19
TRAVIS_PYTHON_VERSION=3.7.2
TRAVIS_OS_NAME=linux
IDENT=3.7.2
TOXENV=3.7
1497.21
TRAVIS_PYTHON_VERSION=3.7.4
TRAVIS_OS_NAME=linux
IDENT=3.7.4
TOXENV=3.7
1497.20
TRAVIS_PYTHON_VERSION=3.7.3
TRAVIS_OS_NAME=linux
IDENT=3.7.3
TOXENV=3.7
1497.23
TRAVIS_PYTHON_VERSION=3.8.0
TRAVIS_OS_NAME=linux
IDENT=3.8.0
TOXENV=3.8
1497.22
TRAVIS_PYTHON_VERSION=3.7.5
TRAVIS_OS_NAME=linux
IDENT=3.7.5
TOXENV=3.7
1497.24
TRAVIS_PYTHON_VERSION=3.8.1
TRAVIS_OS_NAME=linux
IDENT=3.8.0
TOXENV=3.8
1497.8
TRAVIS_PYTHON_VERSION=3.6.1
TRAVIS_OS_NAME=linux
IDENT=3.6.1
TOXENV=3.6
1497.9
TRAVIS_PYTHON_VERSION=3.6.2
TRAVIS_OS_NAME=linux
IDENT=3.6.2
TOXENV=3.6
1497.10
TRAVIS_PYTHON_VERSION=3.6.3
TRAVIS_OS_NAME=linux
IDENT=3.6.3
TOXENV=3.6
1497.11
TRAVIS_PYTHON_VERSION=3.6.4
TRAVIS_OS_NAME=linux
IDENT=3.6.4
TOXENV=3.6
1497.14
TRAVIS_PYTHON_VERSION=3.6.7
TRAVIS_OS_NAME=linux
IDENT=3.6.7
TOXENV=3.6
1497.12
TRAVIS_PYTHON_VERSION=3.6.5
TRAVIS_OS_NAME=linux
IDENT=3.6.5
TOXENV=3.6
1497.15
TRAVIS_PYTHON_VERSION=3.6.8
TRAVIS_OS_NAME=linux
IDENT=3.6.8
TOXENV=3.6
1497.13
TRAVIS_PYTHON_VERSION=3.6.6
TRAVIS_OS_NAME=linux
IDENT=3.6.6
TOXENV=3.6
1497.17
TRAVIS_PYTHON_VERSION=3.7.0
TRAVIS_OS_NAME=linux
IDENT=3.7.0
TOXENV=3.7
1497.18
TRAVIS_PYTHON_VERSION=3.7.1
TRAVIS_OS_NAME=linux
IDENT=3.7.1
TOXENV=3.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