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

[CT-105] use black code formatter #3195

Closed
kwigley opened this issue Mar 25, 2021 · 2 comments · Fixed by #4639 or #4697
Closed

[CT-105] use black code formatter #3195

kwigley opened this issue Mar 25, 2021 · 2 comments · Fixed by #4639 or #4697
Assignees
Labels
jira tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@kwigley
Copy link
Contributor

kwigley commented Mar 25, 2021

Let's introduce the automated code formatting to dbt as long as it does not sacrifice readability. As the codebase matures, it will be nice to not have to think about formatting, generate clean diffs, and maintain a single code style.

black code formatter docs

First, run on a subset of files and get feedback from contributors about stylistic decisions. We may need to tweak line length and other knobs to our liking.
Then:

  • Add black as a dev dependency
  • Update tox.ini and where tox code checks are run in CI and Makefile. May need 2 different tox envs, one to check formatting and one to actually run the formatter
  • Get the changes above reviewed
  • Finally, create a commit that runs the formatter on the whole repo and set the author of the commit to a machine user so we can easily determine blame history.
@kwigley kwigley added the tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality label Jul 15, 2021
@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Jan 12, 2022
@kwigley kwigley removed the stale Issues that have gone stale label Jan 12, 2022
@leahwicz
Copy link
Contributor

leahwicz commented Jan 27, 2022

Closing the other as a dupe and just using this one

@leahwicz leahwicz reopened this Jan 27, 2022
@leahwicz leahwicz added the jira label Jan 27, 2022
@github-actions github-actions bot changed the title use black code formatter [CT-105] use black code formatter Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
3 participants