[pypy-commit] pypy default: small cleanup
rlamy
noreply at buildbot.pypy.org
Wed May 28 19:29:14 CEST 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r71756:bb8dea0b283d
Date: 2014-05-28 18:28 +0100
http://bitbucket.org/pypy/pypy/changeset/bb8dea0b283d/
Log: small cleanup
diff --git a/rpython/annotator/classdef.py b/rpython/annotator/classdef.py
--- a/rpython/annotator/classdef.py
+++ b/rpython/annotator/classdef.py
@@ -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 @@
self.bookkeeper.annotator.reflowfromposition(position)
# 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 = self.name
if s_newvalue.getKind() == description.MethodDesc:
# is method
diff --git a/rpython/rtyper/rclass.py b/rpython/rtyper/rclass.py
--- a/rpython/rtyper/rclass.py
+++ b/rpython/rtyper/rclass.py
@@ -155,7 +155,6 @@
# 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]
More information about the pypy-commit
mailing list