Read about our upcoming Code of Conduct on this issue

Commit f80794fd authored by Ronan Lamy's avatar Ronan Lamy
Browse files

small cleanup

parent 042a8399aa2c
......@@ -2,7 +2,7 @@
Type inference for user-defined classes.
from rpython.annotator.model import (
SomePBC, SomeNone, s_ImpossibleValue, unionof, s_None, SomeInteger,
SomePBC, s_ImpossibleValue, unionof, s_None, SomeInteger,
SomeTuple, SomeString, AnnotatorError)
from rpython.annotator import description
......@@ -104,8 +104,7 @@ class Attribute(object):
# check for method demotion and after-the-fact method additions
if (isinstance(s_newvalue, SomePBC) and
not isinstance(s_newvalue, SomeNone)):
if isinstance(s_newvalue, SomePBC):
attr =
if s_newvalue.getKind() == description.MethodDesc:
# is method
......@@ -155,7 +155,6 @@ class AbstractClassRepr(Repr):
# if s_value is SomePBC([MethodDescs...])
# return a PBC representing the underlying functions
if (isinstance(s_value, annmodel.SomePBC) and
not isinstance(s_value, annmodel.SomeNone) and
s_value.getKind() == description.MethodDesc):
s_value = self.classdef.lookup_filter(s_value)
funcdescs = [mdesc.funcdesc for mdesc in s_value.descriptions]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment