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

Primer: Rethink expected changes logic + configuration #2194

Closed
cooperlees opened this issue May 4, 2021 · 2 comments
Closed

Primer: Rethink expected changes logic + configuration #2194

cooperlees opened this issue May 4, 2021 · 2 comments
Assignees
Labels
C: integrations Editor plugins and other integrations C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases T: enhancement New feature or request

Comments

@cooperlees
Copy link
Collaborator

black-primer's expected changes feature is to be used while we continue to change the evolved syntax, but I don't think it will ever go away. As new python syntax comes and we evolve over time, this will be needed.

That said, I feel it would be nice to have the in black repo config + another mechanism to check if we should, or should not expect formatting changes. I'm all ears for better ideas.

The main problems are:

  • When a projects becomes sync'ed with latest black we have to manually update our configs
  • We don't have a source of truth for what black version a project is using

Ideas:

(Will update as we come up with more)

  • Add to pyproject.toml to live in respective projects repository
    • In here state the black version we expect no changes for
    • This then asks, do we prefer config or repo config (I prefer confg if set, otherwise repo)
@cooperlees cooperlees added T: enhancement New feature or request C: integrations Editor plugins and other integrations labels May 4, 2021
@cooperlees cooperlees self-assigned this May 4, 2021
@JelleZijlstra
Copy link
Collaborator

It would be useful for it to work like mypy-primer: format a project with master and with the PR code, and report any differences in a PR comment. That workflow has been very helpful for testing typeshed changes. It could also separately flag files that the PR crashes on.

@ichard26 ichard26 added the C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases label May 4, 2021
@ichard26 ichard26 self-assigned this Aug 4, 2021
@JelleZijlstra
Copy link
Collaborator

diff-shades does this better, thanks @ichard26!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: integrations Editor plugins and other integrations C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants