about summary refs log tree commit diff
path: root/x.py
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2023-06-22 01:59:24 -0400
committerTrevor Gross <tmgross@umich.edu>2023-08-02 04:40:28 -0400
commit9df0f5d43341a67741b55020def1474ae3748128 (patch)
treeb9520126688313a47b9887ed16235790dd0014ad /x.py
parentefc49e4dfaeeda3c0ee3d2eca90bb532dc7f7610 (diff)
downloadrust-9df0f5d43341a67741b55020def1474ae3748128.tar.gz
rust-9df0f5d43341a67741b55020def1474ae3748128.zip
Fix recent python linting errors
- Remove unneeded imports in 'fuscia-test-runner.py'
- Add explicit stacklevel to 'x.py'
- Fix mutable types as default args in `bootstrap.py` and  `bootstrap_test.py`
Diffstat (limited to 'x.py')
-rwxr-xr-xx.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/x.py b/x.py
index ba959a3047e..6c4c106817e 100755
--- a/x.py
+++ b/x.py
@@ -40,7 +40,7 @@ if __name__ == '__main__':
 
             This message can be suppressed by setting `RUST_IGNORE_OLD_PYTHON=1`
         """.format(major, minor))
-        warnings.warn(msg)
+        warnings.warn(msg, stacklevel=1)
 
     rust_dir = os.path.dirname(os.path.abspath(__file__))
     # For the import below, have Python search in src/bootstrap first.