From 04ade6a2f361f6cf3e81a663c8beffae2aa47107 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 7 Oct 2022 16:50:17 -0400 Subject: [PATCH] Update README.md --- README.md | 1 + src/checks.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b37ceaf413..37877b985e 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,7 @@ The 🛠 emoji indicates that a rule is automatically fixable by the `--fix` com | T203 | PPrintFound | `pprint` found | | 🛠 | | U001 | UselessMetaclassType | `__metaclass__ = type` is implied | | 🛠 | | U002 | UnnecessaryAbspath | `abspath(__file__)` is unnecessary in Python 3.9 and later | | 🛠 | +| U003 | TypeOfPrimitive | Use `str` instead of `type(...)` | | 🛠 | | R001 | UselessObjectInheritance | Class `...` inherits from object | | 🛠 | | R002 | NoAssertEquals | `assertEquals` is deprecated, use `assertEqual` instead | | 🛠 | | M001 | UnusedNOQA | Unused `noqa` directive | | 🛠 | diff --git a/src/checks.rs b/src/checks.rs index 789c27f47b..a1698eb834 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -419,7 +419,7 @@ impl CheckCode { // pyupgrade CheckCode::U001 => CheckKind::UselessMetaclassType, CheckCode::U002 => CheckKind::UnnecessaryAbspath, - CheckCode::U003 => CheckKind::UnnecessaryAbspath, + CheckCode::U003 => CheckKind::TypeOfPrimitive(Primitive::Str), // Refactor CheckCode::R001 => CheckKind::UselessObjectInheritance("...".to_string()), CheckCode::R002 => CheckKind::NoAssertEquals,