-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
It says "All checks passed!" although there are errors #13822
Comments
What kind of errors? This is pretty basic functionality that works for other users so there has to be something specific going on in your setup and we'll need more details to help. |
Can you reproduce your |
Doesn't react to string lengths and different types of quotes, although I specified this in pyproject.toml |
@limafresh Can you provide the contents of the |
pyproject.toml
hello.py
|
Thanks for providing the file contents. First, the [tool.ruff]
line-length = 100
[tool.ruff.format]
quote-style = "double" Now, I'm guessing that you must be looking for a [tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = ["E501"]
[tool.ruff.format]
quote-style = "double" And, regarding the quotes, that would be handled by the formatter which is a separate subcommand. So, running |
Why can't you make everything in check? Check says everything is fine, but format still fixes errors. It's wildly inconvenient. I thought it was a good replacement for flake8, but I was disappointed. |
See #8232 Please be kind to project maintainers. |
How can I see what exactly will be formatted before formatting? |
You can run I take from your response that the original issue has been resolved. If not, feel free to comment here and I can reopen. |
Thank you very much! I just learned for the first time what a formatter is and what they are for, and I thought it was an unfinished linter! Thank you very much, I'm switching to Ruff😊 |
For some reason, i'm hitting the same kind of issue and can't figure out why: ❯ eza -aTI '.git|.venv'
.
├── .editorconfig
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── .ruff_cache
│ ├── .gitignore
│ ├── 0.8.6
│ │ ├── 5085134478066165372
│ │ ├── 5361439220955715206
│ │ ├── 6089338595112545736
│ │ └── 15102853139710753150
│ └── CACHEDIR.TAG
├── hello.py
├── pyproject.toml
├── README.md
└── uv.lock
❯ uv run ruff check -v
[2025-01-08][17:15:05][ruff::resolve][DEBUG] Using configuration file (via parent) at: /Users/csaba/Code/py-experiments/pyproject.toml
[2025-01-08][17:15:05][ruff_linter::settings::types][DEBUG] Detected minimum supported `requires-python` version: 3.13
[2025-01-08][17:15:05][ignore::gitignore][DEBUG] opened gitignore file: /Users/csaba/Code/py-experiments/.gitignore
[2025-01-08][17:15:05][ignore::gitignore][DEBUG] opened gitignore file: /Users/csaba/Code/py-experiments/.git/info/exclude
[2025-01-08][17:15:05][ruff_linter::settings::types][DEBUG] Detected minimum supported `requires-python` version: 3.13
[2025-01-08][17:15:05][ignore::walk][DEBUG] ignoring /Users/csaba/Code/py-experiments/.venv: Ignore(IgnoreMatch(Gitignore(Glob { from: Some("/Users/csaba/Code/py-experiments/.gitignore"), original: ".venv", actual: "**/.venv", is_whitelist: false, is_only_dir: false })))
[2025-01-08][17:15:05][ruff_workspace::resolver][DEBUG] Ignored path via `exclude`: "/Users/csaba/Code/py-experiments/.git"
[2025-01-08][17:15:05][ruff_workspace::resolver][DEBUG] Included path via `include`: "/Users/csaba/Code/py-experiments/pyproject.toml"
[2025-01-08][17:15:05][ignore::gitignore][DEBUG] opened gitignore file: /Users/csaba/Code/py-experiments/.ruff_cache/.gitignore
[2025-01-08][17:15:05][ruff_workspace::resolver][DEBUG] Ignored path via `exclude`: "/Users/csaba/Code/py-experiments/.ruff_cache"
[2025-01-08][17:15:05][ruff_workspace::resolver][DEBUG] Included path via `include`: "/Users/csaba/Code/py-experiments/hello.py"
[2025-01-08][17:15:05][ruff::commands::check][DEBUG] Identified files to lint in: 3.080125ms
[2025-01-08][17:15:05][ruff::diagnostics][DEBUG] Checking: /Users/csaba/Code/py-experiments/pyproject.toml
[2025-01-08][17:15:05][ruff::commands::check][DEBUG] Checked 2 files in: 122.625µs
All checks passed!
[project]
dependencies = []
description = "Add your description here"
name = "py-experiments"
readme = "README.md"
requires-python = ">=3.13"
version = "0.1.0"
[dependency-groups]
dev = [
"pre-commit>=4.0.1",
"pytest>=8.3.4",
"ruff>=0.8.6",
]
[tool.ruff]
fix = true
preview = true
required-version = ">=0.8.6"
show-fixes = true
[tools.ruff.lint]
fixable = ["ALL"]
select = ["ALL"]
[tool.ruff.format]
docstring-code-format = true
def foo(a, b, c):
if a:
if b:
if c:
return 1
else:
return 2
else:
return 3
else:
return 4 The above raises hell on the playground, but is a-okay on my machine. What gives? Also, should this be a seperate issue? |
I have a nasty typo in It should say Sorry for bothering you all. Kudos for the super awesome tool. Love it. ❤ |
It says "All checks passed!", although I deliberately made a lot of errors in the
main.py
file. Configuration in pyproject.toml, but even if you remove it, it's the same.The text was updated successfully, but these errors were encountered: