bpo-45060: Get rid of few uses of the equality operators with None (GH-28087)

This commit is contained in:
Serhiy Storchaka 2021-08-31 16:59:52 +03:00 committed by GitHub
parent 08767c73b5
commit 3c65457156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 13 deletions

View file

@ -144,7 +144,7 @@ def _encode_text(string, charset, cte, policy):
linesep = policy.linesep.encode('ascii')
def embedded_body(lines): return linesep.join(lines) + linesep
def normal_body(lines): return b'\n'.join(lines) + b'\n'
if cte==None:
if cte is None:
# Use heuristics to decide on the "best" encoding.
if max((len(x) for x in lines), default=0) <= policy.max_line_length:
try: