bpo-33534: Remove unneeded test. (GH-6897)

This condition as already tested before this code is called.
(cherry picked from commit 9285835a05)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2018-05-16 04:46:32 -07:00 committed by GitHub
parent 8d486fb93a
commit 8e20fc388f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -544,12 +544,11 @@ def _hash_fn(fields):
def _is_classvar(a_type, typing):
if typing:
# This test uses a typing internal class, but it's the best
# way to test if this is a ClassVar.
return (a_type is typing.ClassVar
or (type(a_type) is typing._GenericAlias
and a_type.__origin__ is typing.ClassVar))
# This test uses a typing internal class, but it's the best way to
# test if this is a ClassVar.
return (a_type is typing.ClassVar
or (type(a_type) is typing._GenericAlias
and a_type.__origin__ is typing.ClassVar))
def _is_initvar(a_type, dataclasses):