Skip to content

Update readme and tox.ini for recent tooling changes #1868

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

Merged
merged 4 commits into from
Mar 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Have tox skip linting unless requested, for now
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 #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 #1865. The bifurcation for black into separate mutating and non-mutating hooks, introduced in 5d8ddd9 (#1693), was not carried over into Ruff autoformatting in #1865. But also it: - Was not necessarily a good approach, and likely should not be preserved in any form. It was an unusual and unintuitive use of pre-commit. (It can be brought back if no better approach is found, though.) - Was done to avoid a situation where it was nontrivial to set up necessary dependencies for linting in the GitPython virtual environment itself, because flake8 and its various plugins would have to be installed. They were not listed in any existing or newly introduced extra (for example, they were not added to test-requirements.txt) in part in the hope that they would all be replaced by Ruff, which happened in #1862. - Already did not achieve its goal as of #1862, since it was (probably rightly) not extended to Ruff linting to use/omit --fix. 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 (#1667), until it was improved in f094909 (#1693) to run with proper isolation.
  • Loading branch information
EliahKagan committed Mar 13, 2024
commit b059cd580b71b44488bf3cc77000a6dea3cb1898
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
requires = tox>=4
env_list = py{37,38,39,310,311,312}, lint, mypy, html
env_list = py{37,38,39,310,311,312}, mypy, html

[testenv]
description = Run unit tests
Expand Down