[python, tests] sync teamcity

GitOrigin-RevId: 6e71cad7396ee71a1293f39cf05635328960ec26
This commit is contained in:
Bernhard Geisberger
2025-08-19 15:17:26 +00:00
committed by intellij-monorepo-bot
parent 204077d8b6
commit 404e120acb
4 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import os
__all__ = ['is_running_under_teamcity']
__version__ = "1.29"
__version__ = "1.33"
teamcity_presence_env_var = "TEAMCITY_VERSION"
+1 -1
View File
@@ -65,7 +65,7 @@ class TeamcityServiceMessages(object):
def encode(self, value):
if self.encoding and isinstance(value, text_type):
value = value.encode(self.encoding)
value = value.encode(self.encoding, errors='backslashreplace')
return value
def decode(self, value):
@@ -84,7 +84,12 @@ class TeamCityReporter(reporters.BaseReporter):
def display_reports(self, layout):
"""Issues the final PyLint score as a TeamCity build statistic value"""
try:
score = self.linter.stats['global_note']
stats = self.linter.stats
score = getattr(stats, 'global_note', None)
# Backwards compatibility for pylint version <2.12
if score is None:
score = stats['global_note']
except (AttributeError, KeyError):
pass
else:
@@ -392,7 +392,7 @@ class EchoTeamCityMessages(object):
for cu in units:
try:
analysis = self.coverage._analyze(cu)
analysis = self.coverage._analyze(cu.filename)
nums = analysis.numbers
total += nums
except KeyboardInterrupt:
@@ -406,7 +406,7 @@ class EchoTeamCityMessages(object):
if typ is NotPython and not cu.should_be_python():
continue
test_id = cu.name
test_id = cu.relname
details = convert_error_to_string(err)
self.messages.testStarted(test_id, flowId=test_id)