Commit 0d72a239 authored by Zhenbo Li's avatar Zhenbo Li Committed by GitHub

Code style: Modernise some set() usages (GH-4109)

parent 1c214e2e
...@@ -100,12 +100,12 @@ uncachable_builtins = [ ...@@ -100,12 +100,12 @@ uncachable_builtins = [
'_', # e.g. used by gettext '_', # e.g. used by gettext
] ]
special_py_methods = set([ special_py_methods = frozenset((
'__cinit__', '__dealloc__', '__richcmp__', '__next__', '__cinit__', '__dealloc__', '__richcmp__', '__next__',
'__await__', '__aiter__', '__anext__', '__await__', '__aiter__', '__anext__',
'__getreadbuffer__', '__getwritebuffer__', '__getsegcount__', '__getreadbuffer__', '__getwritebuffer__', '__getsegcount__',
'__getcharbuffer__', '__getbuffer__', '__releasebuffer__' '__getcharbuffer__', '__getbuffer__', '__releasebuffer__'
]) ))
modifier_output_mapper = { modifier_output_mapper = {
'inline': 'CYTHON_INLINE' 'inline': 'CYTHON_INLINE'
...@@ -382,7 +382,7 @@ class UtilityCodeBase(object): ...@@ -382,7 +382,7 @@ class UtilityCodeBase(object):
elif name == 'substitute': elif name == 'substitute':
# don't want to pass "naming" or "tempita" to the constructor # don't want to pass "naming" or "tempita" to the constructor
# since these will have been handled # since these will have been handled
values = values - set(['naming', 'tempita']) values = values - {'naming', 'tempita'}
if not values: if not values:
continue continue
elif not values: elif not values:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment