Skip to content

Commit fc735bf

Browse files
Apply ruff/pycodestyle rule E713
E713 Test for membership should be `not in`
1 parent b303986 commit fc735bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cffi/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def getctype(self, cdecl, replace_with=''):
407407
if (replace_with.startswith('*')
408408
and '&[' in self._backend.getcname(cdecl, '&')):
409409
replace_with = '(%s)' % replace_with
410-
elif replace_with and not replace_with[0] in '[(':
410+
elif replace_with and replace_with[0] not in '[(':
411411
replace_with = ' ' + replace_with
412412
return self._backend.getcname(cdecl, replace_with)
413413

src/cffi/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_c_name(self, replace_with='', context='a C file', quals=0):
3434
if replace_with:
3535
if replace_with.startswith('*') and '&[' in result:
3636
replace_with = '(%s)' % replace_with
37-
elif not replace_with[0] in '[(':
37+
elif replace_with[0] not in '[(':
3838
replace_with = ' ' + replace_with
3939
replace_with = qualify(quals, replace_with)
4040
result = result.replace('&', replace_with)

0 commit comments

Comments
 (0)