Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 Don't use colon after error code in message text for flake8 #22

Merged
merged 4 commits into from
Jun 5, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion pydoclint/utils/violation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, self.__str__()
msg = f'{self.fullErrorCode} {self.msg}' # no colon b/c that would cause 'yesqa' issues
return self.line, colOffset, msg