Skip to content

Commit 35f52e8

Browse files
committed
Change sentinel to None
1 parent 2769575 commit 35f52e8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/robotlibcore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def get_keyword_documentation(self, name):
137137

138138
def get_keyword_types(self, keyword_name):
139139
method = self.__get_keyword(keyword_name)
140-
if method == {}:
140+
if method is None:
141141
return method
142142
types = getattr(method, 'robot_types', ())
143143
if types is None:
@@ -151,7 +151,7 @@ def __get_keyword(self, keyword_name):
151151
if keyword_name == '__init__':
152152
return self.__init__
153153
if keyword_name.startswith('__') and keyword_name.endswith('__'):
154-
return {}
154+
return None
155155
method = self.keywords.get(keyword_name)
156156
if not method:
157157
raise ValueError('Keyword "%s" not found.' % keyword_name)

utest/test_get_keyword_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def test_init_args(lib):
151151

152152
def test_dummy_magic_method(lib):
153153
types = lib.get_keyword_types('__foobar__')
154-
assert types == {}
154+
assert types is None
155155

156156

157157
@pytest.mark.skipif(PY2, reason='Only applicable on Python 3')

0 commit comments

Comments
 (0)