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

Prefer single quote strings model-card-toolkit #279

Open
codesue opened this issue May 21, 2023 · 2 comments
Open

Prefer single quote strings model-card-toolkit #279

codesue opened this issue May 21, 2023 · 2 comments
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
Collaborator

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
Collaborator

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
Collaborator 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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

No branches or pull requests

2 participants