dorschw / riff Goto Github PK
View Code? Open in Web Editor NEWRun Ruff, but only on modified lines
License: MIT License
Run Ruff, but only on modified lines
License: MIT License
Line 59 in 21cbfe2
In ruff 0.1.x, the argument was changed. In the short-term, we just have to modify this to be output-format
. However, longer-term, we should detect if this command fails. Right now, riff
silently passes everything.
But that ruff command returns an error:
error: unexpected argument '--format' found
tip: to pass '--format' as a value, use '-- --format'
Usage: ruff check <FILES|--fix|--no-fix|--unsafe-fixes|--no-unsafe-fixes|--show-source|--no-show-source|--show-fixes|--no-show-fixes|--diff|--watch|--fix-only|--no-fix-only|--ignore-noqa|--output-format <OUTPUT_FORMAT>|--output-file <OUTPUT_FILE>|--target-version <TARGET_VERSION>|--preview|--no-preview|--config <CONFIG>|--select <RULE_CODE>|--ignore <RULE_CODE>|--extend-select <RULE_CODE>|--extend-ignore <RULE_CODE>|--per-file-ignores <PER_FILE_IGNORES>|--extend-per-file-ignores <EXTEND_PER_FILE_IGNORES>|--exclude <FILE_PATTERN>|--extend-exclude <FILE_PATTERN>|--fixable <RULE_CODE>|--unfixable <RULE_CODE>|--extend-fixable <RULE_CODE>|--extend-unfixable <RULE_CODE>|--respect-gitignore|--no-respect-gitignore|--force-exclude|--no-force-exclude|--line-length <LINE_LENGTH>|--dummy-variable-rgx <DUMMY_VARIABLE_RGX>|--no-cache|--isolated|--cache-dir <CACHE_DIR>|--stdin-filename <STDIN_FILENAME>|--exit-zero|--exit-non-zero-on-fix|--statistics|--add-noqa|--show-files|--show-settings|--extension <EXTENSION>|--ecosystem-ci>
For more information, try '--help'.
I tried to add riff as a pre-commit hook. The documentation is incorrect, the rev parameter belongs to the repo section:
- repo: https://github.com/dorschw/riff
rev: v0.1.9.0
hooks:
- id: riff
additional_dependencies: ["ruff>=0.0.291"] # minimal is 0.0.291
Furthermore, the referenced rev v0.1.9.0
does not exist on the repository. The latest tag is v0.0.287.0
.
release
to Publish to PyPi
sync-ruff-version
hardcodes a .0
suffix, let's vx.y.z.a+1
when x.y.z
is the current ruff version in pyproject.toml and a is the last released Riff version from PyPi. Use 0 if there's no Riff version for x.y.z.When executing riff with --fix flag, it will fix the code in all lines and not only on changed lines.
Basically we can revert ruff changes (using git) on all unchanged lines.
ruff 0.1.x has been released, and is no longer in the alpha status (https://astral.sh/blog/the-ruff-formatter). Can riff be updated to keep in line with the latest ruff?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
charliermarsh/ruff-pre-commit
, ruff
).github/workflows/pre-commit.yml
actions/checkout v4
pre-commit/action v3.0.0
.github/workflows/release.yml
actions/checkout v4
JRubics/poetry-publish v1.17
pyproject.toml
pyproject.toml
python ^3.10
typer >=0.7.0
unidiff ^0.7.5
loguru ^0.7.0
gitpython ^3.1.27
packaging ^23.2
ruff ^0.1.11
pre-commit ^3.3.3
pytest ^7.4.0
ipykernel ^6.25.1
toml ^0.10.2
.pre-commit-config.yaml
charliermarsh/ruff-pre-commit v0.1.9
pre-commit/pre-commit-hooks v4.4.0
pre-commit/mirrors-mypy v1.8.0
smop/pre-commit-hooks v1.0.0
abravalheri/validate-pyproject v0.14
renovatebot/pre-commit-hooks 37.116.0
asottile/dead v1.5.2
When using GitHub annotations, it's not working correctly. For some reason, GitHub Actions isn't parsing it properly.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid packageRules[1].schedule: 'Invalid schedule: Failed to parse "every sunday at noon"', Invalid packageRules[2].schedule: 'Invalid schedule: Failed to parse "noon of the first day of the month"'
if --base-branch
is not provided, and only one of origin/master
/origin/main
exists, use it as default
--format
argument into an enum of supported formatsViolation
the raw
field (#11)To allow more people to view the project and report bugs,
include a link in the pyproject.toml
file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.