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

Extend linting tools #3041

Merged
merged 10 commits into from
Feb 22, 2022
Merged

Extend linting tools #3041

merged 10 commits into from
Feb 22, 2022

Conversation

nateprewitt
Copy link
Contributor

This is a continuation of #2988 to add some more substantial framing for how we handle code structure in the boto projects. This PR is currently a draft for comment and may be broken up into smaller parts for easier review. The current proposal adds 3 new tools to ensure we're cleaning up old code and keeping what we have currently consistent. This also helps expedite PR review by removing the need for iterations on minor style fixes.

Proposed additions:

  • isort - This will order our imports and ensure consistent layout. This avoids duplicate imports by keeping everything in the same spot and makes it easier to find what's already available.
  • pyupgrade - This will automatically "upgrade" existing code to use the feature set configured for the lowest supported version (in this case Python 3.6). This is a more significant change that most version bumps because it's cleaning up all of our Python 2.6, 2.7 and 3.0-3.5 code.
  • black - This is the last one and maybe most contentious. We're adopting black with two caveats, we're not going to enforce quote normalization for now, and we're going to keep line length at 79 for the time being.

@nateprewitt nateprewitt marked this pull request as ready for review October 15, 2021 17:59
@nateprewitt nateprewitt requested a review from joguSD October 15, 2021 17:59
Copy link
Contributor

@joguSD joguSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, noticed quite a few places where we're still using the old string interpolation that didn't get updated.

@nateprewitt
Copy link
Contributor Author

Overall looks good, noticed quite a few places where we're still using the old string interpolation that didn't get updated.

Thanks! I'll look at getting that updated in a follow up PR.

@nateprewitt nateprewitt merged commit 5f9c6cb into boto:develop Feb 22, 2022
@nateprewitt nateprewitt deleted the black_update branch February 22, 2022 21:40
aws-sdk-python-automation added a commit that referenced this pull request Feb 23, 2022
* release-1.21.6:
  Bumping version to 1.21.6
  Add changelog entries from botocore
  Update black to 22.1.0 (#3166)
  Update 3.6 deprecation notice with blog post (#3164)
  Extend linting tools (#3041)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants