lint: switch Black with ruff-format by Borda · Pull Request #1865 · gitpython-developers/GitPython (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Borda

@Borda

@Borda

@Borda Borda marked this pull request as ready for review

March 11, 2024 20:36

Borda

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Mar 12, 2024

@EliahKagan

This also reorganizes the "Specific tools" list, since they are all configured in pyproject.toml now (only flake8 was not before, and it was removed in favor of ruff in gitpython-developers#1862). In doing so, I've also added brief parenthesized phrases to characterize what each of these four tools is for, so readers don't have to look around as much to understand most of the tooling GitPython has set up.

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Mar 12, 2024

@EliahKagan

This is to make it so simple tox usage has the expected property of leaving all source code files in the working tree unchanged.

As noted in c66257e, linting how sometimes performs auto-fixes since gitpython-developers#1862, and the pre-commit command in tox.ini, which had also run black --check, will do even more file editing with gitpython-developers#1865.

The bifurcation for black into separate mutating and non-mutating hooks, introduced in 5d8ddd9 (gitpython-developers#1693), is not carried over into Ruff autoformatting in gitpython-developers#1865. But also it:

Now that Ruff is being used, people can run pip install ruff in a virtual environment, then run the ruff command however they like. This takes the place of multiple tools and plugins.

This commit avoids doing any of the following, even though it may be useful to do them later:

The situation with the tox "lint" environment is thus now similar to that of the tox "html" environment when it was added in e6ec6c8 (gitpython-developers#1667), until it was improved in f094909 (gitpython-developers#1693) to run with proper isolation.

EliahKagan

Makefile Outdated Show resolved Hide resolved

@Borda

EliahKagan

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Mar 13, 2024

@EliahKagan

This is to make it so simple tox usage has the expected property of leaving all source code files in the working tree unchanged.

Linting how sometimes performs auto-fixes since gitpython-developers#1862, and the pre-commit command in tox.ini, which had also run black --check, will do even more file editing due to the changes in gitpython-developers#1865.

The bifurcation for black into separate mutating and non-mutating hooks, introduced in 5d8ddd9 (gitpython-developers#1693), was not carried over into Ruff autoformatting in gitpython-developers#1865. But also it:

Now that Ruff is being used, people can run pip install ruff in a virtual environment, then run the ruff command however they like. This takes the place of multiple tools and plugins.

The situation with the tox "lint" environment is thus now similar to that of the tox "html" environment when it was added in e6ec6c8 (gitpython-developers#1667), until it was improved in f094909 (gitpython-developers#1693) to run with proper isolation.

@Borda Borda deleted the ruff/black branch

March 13, 2024 07:14

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Mar 13, 2024

@EliahKagan

This is no longer used. No pre-commit hook specifies it anymore in stages, since 517f83a (gitpython-developers#1865). See b059cd5 (gitpython-developers#1868) for context.

In the lint.yml GitHub Actions workflow, this removes the extra_args key altogether, because all that would remain there is --all-files, which is already the default for that action, when the extra_args key is absent.

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Mar 13, 2024

@EliahKagan

Although it seems likely that the requirements-dev.txt file will be removed when the project definition is made declarative (discussed in gitpython-developers#1716 comments), if not before, for now it exists and might be in use, so this updates it with tools that are currently used but not listed in any extras or other requirements files:

These packages remain listed:

This requirements-dev.txt file has a few limitations that suggest it should be removed altogether sometime soon:

Since it may go away soon and is not regularly updated, I have kept the explanations for why particular packages are there out of it. But as long as it exists it may as well list the tools that really are being used yet are not explicitly listed as dependencies.

renovate bot referenced this pull request in allenporter/flux-local

Mar 31, 2024

@renovate

Mend
Renovate](https://renovatebot.com)

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
GitPython
==3.1.42 -> ==3.1.43
age](https://docs.renovatebot.com/merge-confidence/)
adoption](https://docs.renovatebot.com/merge-confidence/)
passing](https://docs.renovatebot.com/merge-confidence/)
confidence](https://docs.renovatebot.com/merge-confidence/)

Release Notes

gitpython-developers/GitPython (GitPython)

v3.1.43

Compare Source

Particularly Important Changes

These are likely to affect you, please do take a careful look.

Other Changes

New Contributors

Full Changelog: gitpython-developers/GitPython@3.1.42...3.1.43


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

lettuce-bot bot referenced this pull request in lettuce-financial/github-bot-signed-commit

Apr 1, 2024

@lettuce-bot

Mend
Renovate](https://renovatebot.com)

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
GitPython
==3.1.42 -> ==3.1.43
age](https://docs.renovatebot.com/merge-confidence/)
adoption](https://docs.renovatebot.com/merge-confidence/)
passing](https://docs.renovatebot.com/merge-confidence/)
confidence](https://docs.renovatebot.com/merge-confidence/)

Release Notes

gitpython-developers/GitPython (GitPython)

v3.1.43

Compare Source

Particularly Important Changes

These are likely to affect you, please do take a careful look.

Other Changes

New Contributors

Full Changelog: gitpython-developers/GitPython@3.1.42...3.1.43


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.



This PR has been generated by Mend Renovate. View repository job log here.