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

fix(test): failure in PyCharm on Ubuntu 22 #730

Merged
merged 1 commit into from
Aug 19, 2022
Merged
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
5 changes: 5 additions & 0 deletions universum/analyzers/pylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ def main(settings: argparse.Namespace) -> List[utils.ReportData]:

def pylint_output_parser(output: str) -> List[utils.ReportData]:
result: List[utils.ReportData] = []
# Workaround for colorama polluting the process output when run from PyCharm - remove the trailing color reset
# escape sequence. Details:
# 1. https://github.com/PyCQA/isort/issues/1657
# 2. https://github.com/tartley/colorama/issues/307
output = output[:output.rfind(']') + 1]
for data in json.loads(output):
# pylint has its own escape rules for json output of "message" values.
# it uses cgi.escape lib and escapes symbols <>&
Expand Down