Skip to content

Commit 081aaed

Browse files
pablogsalhugovk
andauthored
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent ee00903 commit 081aaed

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
timeout-minutes: 60
1515
runs-on: ubuntu-20.04
1616
env:
17+
FORCE_COLOR: 1
1718
OPENSSL_VER: 3.0.13
1819
PYTHONSTRICTEXTENSIONBUILD: 1
19-
FORCE_COLOR: 1
2020
steps:
2121
- uses: actions/checkout@v4
2222
- name: Register gcc problem matcher

Lib/test/support/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"LOOPBACK_TIMEOUT", "INTERNET_TIMEOUT", "SHORT_TIMEOUT", "LONG_TIMEOUT",
5959
"Py_DEBUG", "EXCEEDS_RECURSION_LIMIT", "Py_C_RECURSION_LIMIT",
6060
"skip_on_s390x",
61-
"without_optimizer", "set_not_colorized_globally", "reset_colorized_globally",
61+
"without_optimizer", "reset_colorized_globally",
6262
"force_not_colorized"
6363
]
6464

@@ -2574,4 +2574,4 @@ def wrapper(*args, **kwargs):
25742574
for key, value in variables.items():
25752575
if value is not None:
25762576
os.environ[key] = value
2577-
return wrapper
2577+
return wrapper

Lib/test/test_traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4369,7 +4369,7 @@ def test_colorized_detection_checks_for_environment_variables(self):
43694369
else:
43704370
virtual_patching = contextlib.nullcontext()
43714371
with virtual_patching:
4372-
with (unittest.mock.patch("os.isatty") as isatty_mock,
4372+
with (unittest.mock.patch("os.isatty") as isatty_mock,
43734373
unittest.mock.patch("traceback._can_colorize", ORIGINAL_CAN_COLORIZE)):
43744374
isatty_mock.return_value = True
43754375
with unittest.mock.patch("os.environ", {'TERM': 'dumb'}):

Lib/traceback.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ def _can_colorize():
141141
return False
142142
except (ImportError, AttributeError):
143143
return False
144-
145144
if not sys.flags.ignore_environment:
146145
if os.environ.get("PYTHON_COLORS") == "0":
147146
return False

0 commit comments

Comments
 (0)