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

Formatting: use Pyupgrade to remove deprecated code #356

Merged
merged 2 commits into from
Jul 18, 2019

Conversation

Glutexo
Copy link
Collaborator

@Glutexo Glutexo commented Jul 18, 2019

Added Pyupgrade to development dependencies. This tool search Python scripts for pieces of deprecated code and replaces them with more modern variants. In our codebase, this targetted only the API tests, replacing the % string-formatting operator with the str.format method. The tests are still passing 🍏 after the automatic fix.

This is a part of the way towards a better formatted code. #189 #331

@Glutexo Glutexo self-assigned this Jul 18, 2019
Glutexo added 2 commits July 18, 2019 15:07
Installed the Pyupgrade tool as a development dependency. This tool
upgrades deprecated pieces of code into modern ones.
Used the Pyupgrade tool to remove deprecated structures from the Python
files. This targetted only the API tests, specifically replacing the %
string-formatting operator by the str.format method.
@Glutexo
Copy link
Collaborator Author

Glutexo commented Jul 18, 2019

Fixed the Pipfile as I accidentally added the dependency as a regular one and not as a development one.

@dehort dehort merged commit 1104ae5 into RedHatInsights:master Jul 18, 2019
@Glutexo Glutexo deleted the pyupgrade branch July 19, 2019 08:17
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