Skip to content

Commit 17de842

Browse files
committed
PEP compliance: use is not
1 parent 4eab90f commit 17de842

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def add_fns_to_class(self, cls):
527527
if already_exists and (msg_extra := self.overwrite_errors.get(name)):
528528
error_msg = (f'Cannot overwrite attribute {fn.__name__} '
529529
f'in class {cls.__name__}')
530-
if not msg_extra is True:
530+
if msg_extra is not True:
531531
error_msg = f'{error_msg} {msg_extra}'
532532

533533
raise TypeError(error_msg)

Lib/wsgiref/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def start_response_wrapper(*args, **kw):
179179
environ['wsgi.errors'] = ErrorWrapper(environ['wsgi.errors'])
180180

181181
iterator = application(environ, start_response_wrapper)
182-
assert_(iterator is not None and iterator != False,
182+
assert_(iterator is not None and iterator is not False,
183183
"The application must return an iterator, if only an empty list")
184184

185185
check_iterator(iterator)

0 commit comments

Comments
 (0)