diff options
| author | Trevor Gross <tmgross@umich.edu> | 2023-06-10 12:06:17 -0400 |
|---|---|---|
| committer | Trevor Gross <tgross@intrepidcs.com> | 2023-06-16 20:56:01 -0400 |
| commit | 22d00dcd47e0b8e18eb254966750fb523c726e4e (patch) | |
| tree | 603ea4c342940caabe746bc86822350aa5d7f9f4 /src/bootstrap/configure.py | |
| parent | 4b71d79c972a605959b0a7c82b323fbd8562f070 (diff) | |
| download | rust-22d00dcd47e0b8e18eb254966750fb523c726e4e.tar.gz rust-22d00dcd47e0b8e18eb254966750fb523c726e4e.zip | |
Apply changes to fix python linting errors
Diffstat (limited to 'src/bootstrap/configure.py')
| -rwxr-xr-x | src/bootstrap/configure.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 4481e1668b6..a16f77317c8 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -9,7 +9,7 @@ rust_dir = os.path.dirname(os.path.abspath(__file__)) rust_dir = os.path.dirname(rust_dir) rust_dir = os.path.dirname(rust_dir) sys.path.append(os.path.join(rust_dir, "src", "bootstrap")) -import bootstrap +import bootstrap # noqa: E402 class Option(object): @@ -319,7 +319,7 @@ def apply_args(known_args, option_checking, config): for key in known_args: # The `set` option is special and can be passed a bunch of times if key == 'set': - for option, value in known_args[key]: + for _option, value in known_args[key]: keyval = value.split('=', 1) if len(keyval) == 1 or keyval[1] == "true": value = True @@ -401,7 +401,7 @@ def parse_example_config(known_args, config): top_level_keys = [] for line in open(rust_dir + '/config.example.toml').read().split("\n"): - if cur_section == None: + if cur_section is None: if line.count('=') == 1: top_level_key = line.split('=')[0] top_level_key = top_level_key.strip(' #') @@ -523,8 +523,8 @@ def write_uncommented(target, f): block.append(line) if len(line) == 0: if not is_comment: - for l in block: - f.write(l + "\n") + for ln in block: + f.write(ln + "\n") block = [] is_comment = True continue |
