Use f-strings where possible#3984
Merged
Merged
Conversation
Semi-automated using ikamensh/flynt
Collaborator
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3984-all-demos |
abidlabs
reviewed
Apr 27, 2023
abidlabs
reviewed
Apr 27, 2023
Member
|
Thanks so much for fixing these @akx! Just noticed a couple of issues, which I'll commit and then merge in this branch |
Contributor
Author
You're welcome! Should probably enable Ruff UP032 to catch these in the future, but maybe that's after #3979 is merged (the full Ruff UP suite will also change type annotations to new-style ones, which should be fine since most of the codebase is |
akx
added a commit
to akx/gradio
that referenced
this pull request
Apr 28, 2023
abidlabs
added a commit
that referenced
this pull request
Apr 28, 2023
* Update ruff to 0.0.263
* Get rid of bare except:s
* Fix two Ruff E731s by moving expand_{color,size} to the relevant classes
* Fix Ruff E731 and some variable shadowing in theme builder
* Fix remaining Ruff E731s
* Get rid of unused Ruff ignores
* Fix ruff B904 issues (raise from)
* Fix Ruff B007: loop-control variable not used
* Fix Ruff B011 (do not assert false)
* Remove unused args and kwargs from Progress.tqdm() (spotted via Ruff B026)
* Fix mutable argument default in CheckboxGroup
* Noqa ABC-related lint warnings for Interpretable
* Add missed assert in test_queueing (ruff B015)
* Enable ruff B
* Enable ruff C and fix issues
* Add changelog
* Add UP03[012] after #3984
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
.format..formatetc. is replaced with f-strings. Initial automated conversion using ikamensh/flynt followed by manual fixes.Checklist: