Skip to content

Commit

Permalink
Clean type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
yacchin1205 committed Oct 3, 2015
1 parent 0541720 commit 16bc18c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 31 deletions.
42 changes: 14 additions & 28 deletions tests/test-memory/behavior_1/behavior.xar
Expand Up @@ -136,8 +136,7 @@
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -400,8 +399,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -524,8 +522,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -788,8 +785,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -912,8 +908,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -1099,8 +1094,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -1411,8 +1405,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -1634,8 +1627,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -1879,8 +1871,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -2121,8 +2112,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -2265,8 +2255,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -2529,8 +2518,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -2653,8 +2641,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down Expand Up @@ -2895,8 +2882,7 @@ class MyClass(GeneratedClass):
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down
5 changes: 2 additions & 3 deletions web-boxes/Memory/Subscribe to Event/box.xar
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ChoregrapheBox xar_version="3">
<Box name="root" id="10" localization="8" tooltip="Subscribes to an event in ALMemory.&#x0A;When an event is raised, the output is fired.&#x0A;&#x0A;The box is implemented using qi Framework.&#x0A;&#x0A;ALMemory中のイベントを監視します。監視対象のイベントが発火すると、onEvent出力が発火します。&#x0A;&#x0A;このボックスはqi Frameworkを利用して実装されています。&#x0A;&#x0A;&#x0A;@source https://github.com/yacchin1205/pepper-web-boxes" x="564" y="306">
<Box name="root" id="10" localization="8" tooltip="Subscribes to an event in ALMemory.&#x0A;When an event is raised, the output is fired.&#x0A;&#x0A;The box is implemented using qi Framework.&#x0A;&#x0A;ALMemory中のイベントを監視します。監視対象のイベントが発火すると、onEvent出力が発火します。&#x0A;&#x0A;このボックスはqi Frameworkを利用して実装されています。&#x0A;&#x0A;&#x0A;@source https://github.com/yacchin1205/pepper-web-boxes" x="416" y="276">
<bitmap>media/images/box/sensors/STM.png</bitmap>
<script language="4">
<content>
Expand Down Expand Up @@ -36,8 +36,7 @@
def onValue(self, value):
import qi
import types
if type(value) == types.LongType:
if isinstance(value, long):
value = int(value)
qi.async(self.onEvent, value)
Expand Down

0 comments on commit 16bc18c

Please sign in to comment.