| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4e92abd commit 9b6aa7b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -471,7 +471,7 @@ def matches(self, cursor_offset, line, **kwargs): | |||
| 471 | 471 | if (self.method_match(word, n, r.word) and | |
| 472 | 472 | word != "__builtins__"): | |
| 473 | 473 | matches.add(_callable_postfix(val, word)) | |
| 474 | - return matches | ||
| 474 | + return matches if matches else None | ||
| 475 | 475 | ||
| 476 | 476 | def locate(self, current_offset, line): | |
| 477 | 477 | return lineparts.current_single_word(current_offset, line) | |
@@ -496,7 +496,7 @@ def matches(self, cursor_offset, line, **kwargs): | |||
| 496 | 496 | if py3: | |
| 497 | 497 | matches.update(name + '=' for name in argspec[1][4] | |
| 498 | 498 | if name.startswith(r.word)) | |
| 499 | - return matches | ||
| 499 | + return matches if matches else None | ||
| 500 | 500 | ||
| 501 | 501 | def locate(self, current_offset, line): | |
| 502 | 502 | return lineparts.current_word(current_offset, line) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -383,16 +383,16 @@ def test_completions_are_unicode(self): | |||
| 383 | 383 | ||
| 384 | 384 | @unittest.skipIf(py3, "in Python 3 invalid identifiers are passed through") | |
| 385 | 385 | def test_ignores_nonascii_encodable(self): | |
| 386 | - self.assertSetEqual(self.com.matches(3, 'abc', locals_={'abcß': 10}), | ||
| 387 | - set()) | ||
| 386 | + self.assertEqual(self.com.matches(3, 'abc', locals_={'abcß': 10}), | ||
| 387 | + None) | ||
| 388 | 388 | ||
| 389 | 389 | def test_mock_kwlist(self): | |
| 390 | 390 | with mock.patch.object(keyword, 'kwlist', new=['abcd']): | |
| 391 | - self.assertSetEqual(self.com.matches(3, 'abc', locals_={}), set()) | ||
| 391 | + self.assertEqual(self.com.matches(3, 'abc', locals_={}), None) | ||
| 392 | 392 | ||
| 393 | 393 | def test_mock_kwlist_non_ascii(self): | |
| 394 | 394 | with mock.patch.object(keyword, 'kwlist', new=['abcß']): | |
| 395 | - self.assertSetEqual(self.com.matches(3, 'abc', locals_={}), set()) | ||
| 395 | + self.assertEqual(self.com.matches(3, 'abc', locals_={}), None) | ||
| 396 | 396 | ||
| 397 | 397 | ||
| 398 | 398 | class TestParameterNameCompletion(unittest.TestCase): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments