Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python script PEP8 style guide space formatting and minor Python source cleanup #68947

Merged
merged 14 commits into from
Feb 12, 2020

Conversation

chrissimpkins
Copy link
Member

This PR includes the following changes in the Python sources based on a flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.6 on Darwin lint:

  • PEP8 style guide spacing updates without line length changes
  • removal of unused local variable assignments in context managers and exception handling
  • removal of unused Python import statements
  • removal of unnecessary semicolons

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 8, 2020
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-02-08T06:37:25.2203639Z ========================== Starting Command Output ===========================
2020-02-08T06:37:25.2205346Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/1ba8c4c4-4c8b-4826-8216-b17f56575bb7.sh
2020-02-08T06:37:25.2205375Z 
2020-02-08T06:37:25.2208329Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-08T06:37:25.2214760Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68947/merge to s
2020-02-08T06:37:25.2217204Z Task         : Get sources
2020-02-08T06:37:25.2217231Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-08T06:37:25.2217256Z Version      : 1.0.0
2020-02-08T06:37:25.2217457Z Author       : Microsoft
---
2020-02-08T06:37:26.2198160Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-08T06:37:26.2210697Z ##[command]git config gc.auto 0
2020-02-08T06:37:26.2214777Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-08T06:37:26.2218687Z ##[command]git config --get-all http.proxy
2020-02-08T06:37:26.2226300Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68947/merge:refs/remotes/pull/68947/merge
---
2020-02-08T06:43:07.8023051Z    Compiling serde_json v1.0.40
2020-02-08T06:43:09.3787527Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2020-02-08T06:43:18.8489817Z     Finished release [optimized] target(s) in 1m 25s
2020-02-08T06:43:18.8580097Z tidy check
2020-02-08T06:43:19.3664453Z tidy error: /checkout/src/etc/lldb_rust_formatters.py:160: line longer than 100 chars
2020-02-08T06:43:19.3665350Z tidy error: /checkout/src/etc/lldb_rust_formatters.py:162: line longer than 100 chars
2020-02-08T06:43:19.3665641Z tidy error: /checkout/src/etc/lldb_rust_formatters.py:268: line longer than 100 chars
2020-02-08T06:43:19.3666019Z tidy error: /checkout/src/etc/lldb_rust_formatters.py:270: line longer than 100 chars
2020-02-08T06:43:21.3009562Z Found 487 error codes
2020-02-08T06:43:21.3010309Z Found 0 error codes with no tests
2020-02-08T06:43:21.3010480Z Done!
2020-02-08T06:43:21.3010721Z some tidy checks failed
2020-02-08T06:43:21.3010721Z some tidy checks failed
2020-02-08T06:43:21.3022774Z 
2020-02-08T06:43:21.3023025Z 
2020-02-08T06:43:21.3023970Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2020-02-08T06:43:21.3024351Z 
2020-02-08T06:43:21.3024467Z 
2020-02-08T06:43:21.3029079Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2020-02-08T06:43:21.3029324Z Build completed unsuccessfully in 0:01:34
2020-02-08T06:43:21.3029324Z Build completed unsuccessfully in 0:01:34
2020-02-08T06:43:21.3074544Z == clock drift check ==
2020-02-08T06:43:21.3102016Z   local time: Sat Feb  8 06:43:21 UTC 2020
2020-02-08T06:43:21.6395058Z   network time: Sat, 08 Feb 2020 06:43:21 GMT
2020-02-08T06:43:21.6395514Z == end clock drift check ==
2020-02-08T06:43:22.3877138Z 
2020-02-08T06:43:22.3968747Z ##[error]Bash exited with code '1'.
2020-02-08T06:43:22.3979641Z ##[section]Finishing: Run build
2020-02-08T06:43:22.3992218Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68947/merge to s
2020-02-08T06:43:22.3994671Z Task         : Get sources
2020-02-08T06:43:22.3994726Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-08T06:43:22.3994765Z Version      : 1.0.0
2020-02-08T06:43:22.3994798Z Author       : Microsoft
2020-02-08T06:43:22.3994798Z Author       : Microsoft
2020-02-08T06:43:22.3994857Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-08T06:43:22.3994898Z ==============================================================================
2020-02-08T06:43:22.7836465Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-08T06:43:22.7873708Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68947/merge to s
2020-02-08T06:43:22.7985140Z Cleaning up task key
2020-02-08T06:43:22.7985822Z Start cleaning up orphan processes.
2020-02-08T06:43:22.8097811Z Terminate orphan process: pid (3991) (python)
2020-02-08T06:43:22.8308603Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@chrissimpkins
Copy link
Member Author

chrissimpkins commented Feb 8, 2020

77d158d addresses 4 tidy line length > 100 errors in the Run Build step of the Linux x86_64-gnu-llvm-7 build

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 10, 2020

📌 Commit 77d158d has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 10, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 12, 2020
…chton

Python script PEP8 style guide space formatting and minor Python source cleanup

This PR includes the following changes in the Python sources based on a flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.6 on Darwin lint:

- PEP8 style guide spacing updates *without* line length changes
- removal of unused local variable assignments in context managers and exception handling
- removal of unused Python import statements
- removal of unnecessary semicolons
bors added a commit that referenced this pull request Feb 12, 2020
Rollup of 11 pull requests

Successful merges:

 - #67695 (Added dyn and true keyword docs)
 - #68487 ([experiment] Support linking from a .rlink file)
 - #68554 (Split lang_items to crates `rustc_hir` and `rustc_passes`.)
 - #68937 (Test failure of unchecked arithmetic intrinsics in const eval)
 - #68947 (Python script PEP8 style guide space formatting and minor Python source cleanup)
 - #68999 (remove dependency on itertools)
 - #69026 (Remove common usage pattern from `AllocRef`)
 - #69027 (Add missing `_zeroed` varants to `AllocRef`)
 - #69058 (Preparation for allocator aware `Box`)
 - #69070 (Add self to .mailmap)
 - #69077 (Fix outdated doc comment.)

Failed merges:

r? @ghost
@bors bors merged commit 77d158d into rust-lang:master Feb 12, 2020
@chrissimpkins chrissimpkins deleted the python-fmt branch February 13, 2020 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants