forked from VimPlug/jedi
Name this list of accepted symbol differences
This should make it easier to add new entries as well as clarifying the intent of this filter.
This commit is contained in:
@@ -73,15 +73,19 @@ class TestSetupReadline(unittest.TestCase):
|
|||||||
import os
|
import os
|
||||||
s = 'from os import '
|
s = 'from os import '
|
||||||
goal = {s + el for el in dir(os)}
|
goal = {s + el for el in dir(os)}
|
||||||
|
|
||||||
# There are minor differences, e.g. the dir doesn't include deleted
|
# There are minor differences, e.g. the dir doesn't include deleted
|
||||||
# items as well as items that are not only available on linux.
|
# items as well as items that are not only available on linux.
|
||||||
difference = set(self.complete(s)).symmetric_difference(goal)
|
difference = set(self.complete(s)).symmetric_difference(goal)
|
||||||
|
ACCEPTED_DIFFERENCE_PREFIXES = [
|
||||||
|
'_', 'O_', 'EX_', 'MFD_',
|
||||||
|
'SF_', 'ST_', 'CLD_', 'POSIX_SPAWN_', 'P_',
|
||||||
|
'RWF_', 'CLONE_', 'SCHED_',
|
||||||
|
]
|
||||||
difference = {
|
difference = {
|
||||||
x for x in difference
|
x for x in difference
|
||||||
if all(not x.startswith('from os import ' + s)
|
if all(not x.startswith('from os import ' + prefix)
|
||||||
for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_', 'ST_',
|
for prefix in ACCEPTED_DIFFERENCE_PREFIXES)
|
||||||
'CLD_', 'POSIX_SPAWN_', 'P_', 'RWF_',
|
|
||||||
'CLONE_', 'SCHED_'])
|
|
||||||
}
|
}
|
||||||
# There are quite a few differences, because both Windows and Linux
|
# There are quite a few differences, because both Windows and Linux
|
||||||
# (posix and nt) libraries are included.
|
# (posix and nt) libraries are included.
|
||||||
|
|||||||
Reference in New Issue
Block a user