Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/ruff_linter/src/rules/pep8_naming/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ mod tests {
Ok(())
}

#[test_case(Rule::InvalidArgumentName, Path::new("N803.py"))]
#[test_case(Rule::InvalidArgumentName, Path::new("N804.py"))]
fn preview_rules(rule_code: Rule, path: &Path) -> Result<()> {
let snapshot = format!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::checkers::ast::Checker;
/// > mixedCase is allowed only in contexts where that’s already the
/// > prevailing style (e.g. threading.py), to retain backwards compatibility.
///
/// In [preview], overridden methods are ignored.
/// Methods decorated with `@typing.override` are ignored.
///
/// ## Example
/// ```python
Expand Down Expand Up @@ -61,8 +61,7 @@ pub(crate) fn invalid_argument_name_function(checker: &Checker, function_def: &S
let semantic = checker.semantic();
let scope = semantic.current_scope();

if checker.settings.preview.is_enabled()
&& matches!(scope.kind, ScopeKind::Class(_))
if matches!(scope.kind, ScopeKind::Class(_))
&& is_override(&function_def.decorator_list, semantic)
{
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ N803.py:6:28: N803 Argument name `A` should be lowercase
7 | return _, a, A
|

N803.py:18:28: N803 Argument name `A` should be lowercase
|
16 | class Extended(Class):
17 | @override
18 | def method(self, _, a, A): ...
| ^ N803
|

N803.py:22:16: N803 Argument name `A` should be lowercase
|
21 | @override # Incorrect usage
Expand Down

This file was deleted.

Loading