Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type_enforce test failure on 3.9 #305

Closed
thatch opened this issue May 31, 2020 · 0 comments
Closed

type_enforce test failure on 3.9 #305

thatch opened this issue May 31, 2020 · 0 comments

Comments

@thatch
Copy link
Contributor

thatch commented May 31, 2020

Once #297 is fixed, there are a couple of failures. This one is a behavior change in typing.Iterable.

======================================================================
ERROR: test_basic_pass_19 (libcst.tests.test_type_enforce.TypeEnforcementTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/LibCST/libcst/testing/utils.py", line 89, in new_test
    return member(self, *data)
  File "/home/tim/code/LibCST/libcst/tests/test_type_enforce.py", line 135, in test_basic_pass
    is_value_of_type(value, expected_type),
  File "/home/tim/code/LibCST/libcst/_type_enforce.py", line 136, in is_value_of_type
    elif issubclass(expected_origin_type, Iterable) and not issubclass(
TypeError: issubclass() arg 1 must be a class

It appears to be a difference in typing_inspect.get_origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants