From 3daf6e1b6ddef48ee6d429c5db16e0283ab01b84 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+KotlinIsland@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:43:46 +1000 Subject: [PATCH] =?UTF-8?q?(=F0=9F=90=9E)=20Add=20the=20missing=20period?= =?UTF-8?q?=20in=20error=20message=20(#9485)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary I noticed that there should be a missing period added to some of the new error messages for Unnecessary dunder call: ``` sandpit\test.py:6:16: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.. ``` ## Test Plan Static analysis of the implementation, as this has no existing test cases. --- .../src/rules/pylint/rules/unnecessary_dunder_call.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ruff_linter/src/rules/pylint/rules/unnecessary_dunder_call.rs b/crates/ruff_linter/src/rules/pylint/rules/unnecessary_dunder_call.rs index 9c81143a38871..ea88f7b9121d0 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/unnecessary_dunder_call.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/unnecessary_dunder_call.rs @@ -283,15 +283,15 @@ impl DunderReplacement { "__delitem__" => Some(Self::MessageOnly("Use `del` statement")), "__divmod__" => Some(Self::MessageOnly("Use `divmod()` builtin")), "__format__" => Some(Self::MessageOnly( - "Use `format` builtin, format string method, or f-string.", + "Use `format` builtin, format string method, or f-string", )), "__fspath__" => Some(Self::MessageOnly("Use `os.fspath` function")), "__get__" => Some(Self::MessageOnly("Use `get` method")), "__getattr__" => Some(Self::MessageOnly( - "Access attribute directly or use getattr built-in function.", + "Access attribute directly or use getattr built-in function", )), "__getattribute__" => Some(Self::MessageOnly( - "Access attribute directly or use getattr built-in function.", + "Access attribute directly or use getattr built-in function", )), "__getitem__" => Some(Self::MessageOnly("Access item via subscript")), "__init__" => Some(Self::MessageOnly("Instantiate class directly")), @@ -304,7 +304,7 @@ impl DunderReplacement { "__rpow__" => Some(Self::MessageOnly("Use ** operator or `pow()` builtin")), "__set__" => Some(Self::MessageOnly("Use subscript assignment")), "__setattr__" => Some(Self::MessageOnly( - "Mutate attribute directly or use setattr built-in function.", + "Mutate attribute directly or use setattr built-in function", )), "__setitem__" => Some(Self::MessageOnly("Use subscript assignment")), "__truncate__" => Some(Self::MessageOnly("Use `math.trunc()` function")),