From 488439ccf3fdbb36e33c7b30920106b4012faeac Mon Sep 17 00:00:00 2001 From: s-weigand Date: Sat, 3 Jun 2023 13:45:01 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A9=B9=20Strip=20colon=20after=20erro?= =?UTF-8?q?r=20code=20in=20message=20text=20for=20flake8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pydoclint/utils/violation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydoclint/utils/violation.py b/pydoclint/utils/violation.py index c9653a1..dc974f2 100644 --- a/pydoclint/utils/violation.py +++ b/pydoclint/utils/violation.py @@ -72,4 +72,4 @@ def _str(self, showLineNum: bool = False) -> str: def getInfoForFlake8(self) -> Tuple[int, int, str]: """Get the violation info for flake8""" colOffset: int = 0 # we don't need column offset to locate the issue - return self.line, colOffset, self.__str__() + return self.line, colOffset, f'{self.fullErrorCode} {self.msg}' From 1589c9b293b87d671972445beee063230546167a Mon Sep 17 00:00:00 2001 From: jsh9 <25124332+jsh9@users.noreply.github.com> Date: Sun, 4 Jun 2023 19:54:44 -0700 Subject: [PATCH 2/3] Explain why no colons in flake8 msg --- pydoclint/utils/violation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pydoclint/utils/violation.py b/pydoclint/utils/violation.py index dc974f2..67c041f 100644 --- a/pydoclint/utils/violation.py +++ b/pydoclint/utils/violation.py @@ -72,4 +72,5 @@ def _str(self, showLineNum: bool = False) -> str: def getInfoForFlake8(self) -> Tuple[int, int, str]: """Get the violation info for flake8""" colOffset: int = 0 # we don't need column offset to locate the issue - return self.line, colOffset, f'{self.fullErrorCode} {self.msg}' + msg = f'{self.fullErrorCode} {self.msg}' # no colon b/c that would cause 'yesqa' issues + return self.line, colOffset, msg From 35fb743f98d19f27d8ae2cf4ddfc9bfcacfd8f76 Mon Sep 17 00:00:00 2001 From: jsh9 <25124332+jsh9@users.noreply.github.com> Date: Sun, 4 Jun 2023 19:57:30 -0700 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c5a30e..576ff79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - Fixed - Encoding issues in Windows (where non-ASCII characters cause issues with Windows + pre-commit) + - Stopped using colons (:) in flake8 error messages because they could cause + issues with tools like "yesqa" ## [0.0.7] - 2023-06-01