@@ -265,8 +265,8 @@ def initialize_options(self):
265
265
self ._parent .initialize_options (self )
266
266
267
267
# boolean
268
- b_values = {0 , 1 , "1" , "0" , True , False }
269
- t_values = {1 , "1" , True }
268
+ b_values = {0 , 1 , "1" , "0" , True , False } # noqa: B033
269
+ t_values = {1 , "1" , True } # noqa: B033
270
270
for att in ["use_nvtx" , "use_cuda" , "manylinux" ]:
271
271
v = getattr (self , att )
272
272
if v is not None :
@@ -295,17 +295,17 @@ def initialize_options(self):
295
295
def finalize_options (self ):
296
296
self ._parent .finalize_options (self )
297
297
298
- b_values = {0 , 1 , "1" , "0" , True , False , "True" , "False" }
298
+ b_values = {0 , 1 , "1" , "0" , True , False , "True" , "False" } # noqa: B033
299
299
if self .use_nvtx not in b_values :
300
300
raise ValueError (f"use_nvtx={ self .use_nvtx !r} must be in { b_values } ." )
301
301
if self .use_cuda is None :
302
302
self .use_cuda = find_cuda ()
303
303
if self .use_cuda not in b_values :
304
304
raise ValueError (f"use_cuda={ self .use_cuda !r} must be in { b_values } ." )
305
305
306
- self .use_nvtx = self .use_nvtx in {1 , "1" , True , "True" }
307
- self .use_cuda = self .use_cuda in {1 , "1" , True , "True" }
308
- self .manylinux = self .manylinux in {1 , "1" , True , "True" }
306
+ self .use_nvtx = self .use_nvtx in {1 , "1" , True , "True" } # noqa: B033
307
+ self .use_cuda = self .use_cuda in {1 , "1" , True , "True" } # noqa: B033
308
+ self .manylinux = self .manylinux in {1 , "1" , True , "True" } # noqa: B033
309
309
310
310
if self .cuda_version in (None , "" ):
311
311
self .cuda_version = None
@@ -599,7 +599,7 @@ def get_ext_modules():
599
599
add_cuda = False
600
600
elif "--use-cuda=0" in sys .argv :
601
601
add_cuda = False
602
- elif os .environ .get ("USE_CUDA" , None ) in {0 , "0" , False }:
602
+ elif os .environ .get ("USE_CUDA" , None ) in {0 , "0" , False }: # noqa: B033
603
603
add_cuda = False
604
604
if add_cuda :
605
605
cuda_extensions .extend ([])
0 commit comments