IDLE: replace if statement with expression (GH-94228)

(cherry picked from commit 91f9947f23)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2022-06-24 10:30:55 -07:00 committed by GitHub
parent 64892c5e36
commit 14943829a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,14 +13,10 @@ from idlelib.config import idleConf
from idlelib.util import py_extensions
py_extensions = ' '.join("*"+ext for ext in py_extensions)
encoding = 'utf-8'
if sys.platform == 'win32':
errors = 'surrogatepass'
else:
errors = 'surrogateescape'
errors = 'surrogatepass' if sys.platform == 'win32' else 'surrogateescape'
class IOBinding:
# One instance per editor Window so methods know which to save, close.
# Open returns focus to self.editwin if aborted.