ruff/crates
Carl Meyer 42d52ebbec
Support FORCE_COLOR env var (#10839)
Fixes #5499 

## Summary

Add support for `FORCE_COLOR` env var, as specified at
https://force-color.org/

## Test Plan

I wrote an integration test for this, and then realized that can't work,
since we use a dev-dependency on `colored` with the `no-color` feature
to avoid ANSI color codes in test snapshots.

So this is just tested manually.

`cargo run --features test-rules -- check --no-cache --isolated -
--select RUF901 --diff < /dev/null` shows a colored diff.
`cargo run --features test-rules -- check --no-cache --isolated -
--select RUF901 --diff < /dev/null | less` does not have color, since we
pipe it to `less`.
`FORCE_COLOR=1 cargo run --features test-rules -- check --no-cache
--isolated - --select RUF901 --diff < /dev/null | less` does have color
(after this diff), even though we pipe it to `less`.
2024-04-08 15:29:29 -06:00
..
ruff Support FORCE_COLOR env var (#10839) 2024-04-08 15:29:29 -06:00
ruff_benchmark Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_cache Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_dev Docs: Link inline settings when not part of options section (#10499) 2024-03-21 16:33:58 +00:00
ruff_diagnostics Respect # noqa directives on __all__ openers (#10798) 2024-04-06 14:51:17 +00:00
ruff_formatter Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_index Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_linter Localize cleanup for FunctionDef and ClassDef (#10837) 2024-04-08 13:29:38 -06:00
ruff_macros Remove long Iterator::chain sequence in RuleCodePrefix::iter (#10452) 2024-03-18 16:51:20 +01:00
ruff_notebook Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_python_ast Update pre-commit dependencies (#10698) 2024-04-06 23:00:41 +00:00
ruff_python_codegen Track casing of r-string prefixes in the tokenizer and AST (#10314) 2024-03-18 17:18:04 +00:00
ruff_python_formatter Update Rust to v1.77 (#10510) 2024-03-21 12:10:33 -04:00
ruff_python_index Fix Indexer fails to identify continuation preceded by newline #10351 (#10354) 2024-03-12 00:35:41 -04:00
ruff_python_literal Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_python_parser Remove an unused dependency (#10747) 2024-04-03 09:57:19 +01:00
ruff_python_resolver chore(deps): update rust crate insta to v1.38.0 (#10701) 2024-04-01 15:44:30 +00:00
ruff_python_semantic [pyflakes] Allow forward references in class bases in stub files (F821) (#10779) 2024-04-07 01:15:58 +01:00
ruff_python_stdlib [pylint] Include builtin warnings in useless-exception-statement (PLW0133) (#10394) 2024-03-13 15:26:11 -04:00
ruff_python_trivia Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_server The linter and code actions can now be disabled in client settings for ruff server (#10800) 2024-04-08 07:53:28 -07:00
ruff_shrinking Bump version to v0.3.5 (#10717) 2024-04-01 13:15:32 -04:00
ruff_source_file Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_text_size Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_wasm Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_workspace [flake8-boolean-trap] Add setting for user defined allowed boolean trap (#10531) 2024-03-30 00:26:12 +00:00