Showing 1 of 1 files from the diff.

@@ -502,13 +502,17 @@
Loading
502 502
            response = []
503 503
            for name, kind in func.__annotations__.items():
504 504
                if name in arguments:
505 +
                    # if a "type" has __origin__ attribute it is a
506 +
                    # parameterized generic
505 507
                    if getattr(kind, "__origin__", None) == Union:
508 +
                        expected_types = [arg.__name__ for arg in kind.__args__]
506 509
                        if not isinstance(arguments[name], kind.__args__):
507 510
                            response.append(
508 -
                                "'{}' required={} got={}".format(name, kind.__name__, type(arguments[name]).__name__))
511 +
                                "'{}' expected types={} got={}".format(name, expected_types,
512 +
                                                                       type(arguments[name]).__name__))
509 513
                    elif not isinstance(arguments[name], kind):
510 514
                        response.append(
511 -
                            "'{}' required={} got={}".format(name, kind.__name__, type(arguments[name]).__name__))
515 +
                            "'{}' expected type={} got={}".format(name, kind.__name__, type(arguments[name]).__name__))
512 516
            if response:
513 517
                raise TypeCheckError(', '.join(response))
514 518
            return await txaio.as_future(func, *args, **kwargs)
Files Coverage
autobahn 57.89%
Project Totals (71 files) 57.89%
Untitled

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