Skip to content

Commit 1f61c83

Browse files
Apply ruff/pycodestyle rule E713
E713 Test for membership should be `not in`
1 parent 687f93f commit 1f61c83

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
@@ -401,7 +401,7 @@ def getctype(self, cdecl, replace_with=''):
401401
if (replace_with.startswith('*')
402402
and '&[' in self._backend.getcname(cdecl, '&')):
403403
replace_with = '(%s)' % replace_with
404-
elif replace_with and not replace_with[0] in '[(':
404+
elif replace_with and replace_with[0] not in '[(':
405405
replace_with = ' ' + replace_with
406406
return self._backend.getcname(cdecl, replace_with)
407407

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)