Skip to content

Commit

Permalink
better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Sep 10, 2024
1 parent 47ae15f commit 183ecab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ impl Violation for UndefinedName {
} = self;
let tip = minor_version_builtin_added.map(|version_added| {
format!(
"Added as a builtin in Python 3.{version_added}; \
consider specifying a newer `target-version` in your Ruff config."
r#"Consider specifying `requires-python = ">= 3.{version_added}"` or `tool.ruff.target-version = "py3{version_added}"` in your `pyproject.toml` file."#
)
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
---
<filename>:1:1: F821 Undefined name `PythonFinalizationError`. Added as a builtin in Python 3.13; consider specifying a newer `target-version` in your Ruff config.
<filename>:1:1: F821 Undefined name `PythonFinalizationError`. Consider specifying `requires-python = ">= 3.13"` or `tool.ruff.target-version = "py313"` in your `pyproject.toml` file.
|
1 | PythonFinalizationError
| ^^^^^^^^^^^^^^^^^^^^^^^ F821
Expand Down

0 comments on commit 183ecab

Please sign in to comment.