diff options
author | Mats Wichmann <mats@linux.com> | 2023-08-04 14:37:28 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2023-08-04 14:42:12 (GMT) |
commit | f3d1936c34333b8b535269a007a5598e93029bc0 (patch) | |
tree | d57e134d5dca344c8da28b7c62290f2c4ac6127e /SCons/Executor.py | |
parent | e141cd3288ece58340a1a9e5d99a8c4f810366a9 (diff) | |
download | SCons-f3d1936c34333b8b535269a007a5598e93029bc0.zip SCons-f3d1936c34333b8b535269a007a5598e93029bc0.tar.gz SCons-f3d1936c34333b8b535269a007a5598e93029bc0.tar.bz2 |
"Modernize" to Python 3.6 via tool
$ pyupgrade --py36-plus $(<filelist)
Here's mostly what it's done:
- No more 'stringliteral'.encode('utf-8'): now b'stringliteral'
- No more unicode literals
- the default open mode is 'r', leaves out if default
- some f-string conversions (if shorter)
- catch OSError instead of subclasses
- no more mention of "object"
- generator expression instead of list comp. when safe
- a few tests had a shebang but actually began with blank line
- remove coding: utf-8 comment, per pep 3120 this is the default now
Manually - if a file in test/ was modified, then did the copyright
header conversion.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Executor.py')
-rw-r--r-- | SCons/Executor.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SCons/Executor.py b/SCons/Executor.py index 153b010..02be2c9 100644 --- a/SCons/Executor.py +++ b/SCons/Executor.py @@ -145,7 +145,7 @@ _execute_str_map = {0 : execute_null_str, 1 : execute_actions_str} -class Executor(object, metaclass=NoSlotsPyPy): +class Executor(metaclass=NoSlotsPyPy): """A class for controlling instances of executing an action. This largely exists to hold a single association of an action, @@ -576,7 +576,7 @@ def get_NullEnvironment(): nullenv = NullEnvironment() return nullenv -class Null(object, metaclass=NoSlotsPyPy): +class Null(metaclass=NoSlotsPyPy): """A null Executor, with a null build Environment, that does nothing when the rest of the methods call it. |