Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Prefer single quote strings model-card-toolkit #279

Open
codesue opened this issue May 21, 2023 · 3 comments · May be fixed by #301
Open

Prefer single quote strings model-card-toolkit #279

codesue opened this issue May 21, 2023 · 3 comments · May be fixed by #301
Labels
contributions welcome This issue is ready to be worked on good first issue Good for newcomers maintenance Chores and process improvements

Comments

@codesue
Copy link
Contributor

codesue commented May 21, 2023

Currently, model-card-toolkit uses both single quotes and double quotes for strings. Update the codebase to use single quote strings so that we have consistent style across the project.

Update yapf lint tooling to prefer single quote strings (if possible).

@codesue codesue added good first issue Good for newcomers contributions welcome This issue is ready to be worked on maintenance Chores and process improvements labels May 21, 2023
@hanneshapke
Copy link
Contributor

Thank you @codesue for linking the yapf issue. The issue is open for 3+ years and the consensus is

use black to change the quote and then use yapf to make it format the way you want.

Should we use black before yapf?

@codesue
Copy link
Contributor Author

codesue commented May 22, 2023

black prefers double quote strings over single quote strings. psf/black#118

I prefer single quote strings and they're consistent with a lot of other tensorflow org projects, but I wouldn't be a blocker if others prefer double quote strings and if there's tooling to format the code so I don't have to think about it.

black refuses to support 2-space indents, though, so I wonder if it'll be more trouble than it's worth. psf/black#378

@rshiue rshiue linked a pull request Sep 12, 2024 that will close this issue
4 tasks
@rshiue
Copy link

rshiue commented Sep 12, 2024

Hi @codesue
I walked through the Python codes and did some replacements. See if this PR still adds value to you.
Thanks for publishing this toolkit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contributions welcome This issue is ready to be worked on good first issue Good for newcomers maintenance Chores and process improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants