From 9e55a91394add360fc1192f4be9eae4805f561ff Mon Sep 17 00:00:00 2001 From: Albertas Gimbutas Date: Sat, 6 Apr 2024 23:21:43 +0300 Subject: [PATCH] Add DCXXX codes for backward compatibility Also bump package version to 2.3.0. --- README.md | 2 +- deadcode/visitor/noqa.py | 13 +++++++++++++ pyproject.toml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a4a578b..18c1052 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ To see suggested fixes for all files: deadcode . --fix --dry ``` -To see suggested fixes for only `foo.py` file: +To see suggested fixes only for `foo.py` file: ```shell deadcode . --fix --dry foo.py ``` diff --git a/deadcode/visitor/noqa.py b/deadcode/visitor/noqa.py index 9bc3ec5..6bf6ab3 100644 --- a/deadcode/visitor/noqa.py +++ b/deadcode/visitor/noqa.py @@ -31,6 +31,19 @@ "DC11": "DC11", "DC12": "DC12", "DC13": "DC13", + # For backward compatibility + "DC001": "DC01", + "DC002": "DC02", + "DC003": "DC03", + "DC004": "DC04", + "DC005": "DC05", + "DC006": "DC06", + "DC007": "DC07", + "DC008": "DC08", + "DC009": "DC09", + "DC011": "DC11", + "DC012": "DC12", + "DC013": "DC13", } diff --git a/pyproject.toml b/pyproject.toml index 69fae39..fea4fdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "deadcode" -version = "2.2.2" +version = "2.3.0" authors = [ {name = "Albertas Gimbutas", email = "albertasgim@gmail.com"}, ]