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

Apply black to the files still involved in other pull requests #3861

Open
Remi-Gau opened this issue Jul 20, 2023 · 9 comments
Open

Apply black to the files still involved in other pull requests #3861

Remi-Gau opened this issue Jul 20, 2023 · 9 comments
Assignees
Labels
Code quality This issue tackles code quality (code refactoring, PEP8...).

Comments

@Remi-Gau
Copy link
Collaborator

  • realized that during the hackathon some people would use black and end up reformating files that should not have because they are still involved in other PRs
  • some of the PRs with those files have been opened for a certain amount of time and it may still take some time for them to be finished

it would be nice to find a way to be able to apply black to the whole codebase and minimize merge conflicts on those old PRs

possible route:

  • apply black to a file in main
  • use the same black config to reformat the file in the PR
  • hopefully this should be easy (#FamousLastWords)
@bthirion
Copy link
Member

No better suggestion. How far are we with black. I thought it was over (did not check carefully, sorry).

@Remi-Gau
Copy link
Collaborator Author

We are done for all the files not involved in PR.
The list of excluded files is in the pyproject.toml.
But during the hackathon we realized that those excluded files can still lead to headaches if people's IDE is set to auto reformat or if they run black manually on some files.
So it is better to find a way to finish the job completely.

@bthirion
Copy link
Member

We should try your approach in one submodule and see how well it goes.

@Remi-Gau
Copy link
Collaborator Author

Either that or do it PR by PR.

@ymzayek
Copy link
Member

ymzayek commented Jul 23, 2023

We can start with files in PRs opened by core devs

@Remi-Gau
Copy link
Collaborator Author

You read my mind.

@Remi-Gau
Copy link
Collaborator Author

started trying "fixing black" on some of the old PRs... it feels that it will prove a bit of headache in any case
will try with a couple more but it seems that there will always some merge conflicts to fix

@bthirion
Copy link
Member

bthirion commented Aug 2, 2023

But "There is no alternative" as they put it...

@Remi-Gau Remi-Gau added this to the release 0.11.0 milestone Aug 21, 2023
@Remi-Gau Remi-Gau added the Code quality This issue tackles code quality (code refactoring, PEP8...). label Sep 19, 2023
@ymzayek
Copy link
Member

ymzayek commented Dec 11, 2023

I linked these latest PRs here but I misread the title of the issue. The new blacked files are NOT involved in pull requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality This issue tackles code quality (code refactoring, PEP8...).
Projects
None yet
Development

No branches or pull requests

3 participants