Skip to content

Commit b564e63

Browse files
committed
minor cleanups
1 parent 6949cba commit b564e63

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Doc/library/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ The following exceptions are used mostly as base classes for other exceptions.
177177
Traceback (most recent call last):
178178
File "<python-input-0>", line 1, in <module>
179179
raise RuntimeError("example")
180-
RuntimeError: example <@2025-02-08T01:21:28.675309>
180+
RuntimeError: example <@2025-02-08T01:21:28.675309Z>
181181

182182
With ``PYTHON_TRACEBACK_TIMESTAMPS=ns`` in the environment ::
183183

Lib/test/test_sys.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -863,11 +863,7 @@ def test_sys_flags(self):
863863
"warn_default_encoding", "safe_path", "int_max_str_digits")
864864
for attr in attrs:
865865
self.assertTrue(hasattr(sys.flags, attr), attr)
866-
match attr:
867-
case "dev_mode" | "safe_path":
868-
attr_type = bool
869-
case _:
870-
attr_type = int
866+
attr_type = bool if attr in ("dev_mode", "safe_path") else int
871867
self.assertEqual(type(getattr(sys.flags, attr)), attr_type, attr)
872868
self.assertTrue(repr(sys.flags))
873869
self.assertEqual(len(sys.flags), len(attrs))

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _timestamp_formatter(ns):
205205

206206
# The regular expression to match timestamps as formatted in tracebacks.
207207
# Not compiled to avoid importing the re module by default.
208-
TIMESTAMP_AFTER_EXC_MSG_RE_GROUP = r"(?P<timestamp> <@[0-9:.Tsnu-]{18,26}>)"
208+
TIMESTAMP_AFTER_EXC_MSG_RE_GROUP = r"(?P<timestamp> <@[0-9:.Tsnu-]{18,26}Z?>)"
209209

210210

211211
def strip_exc_timestamps(output):

0 commit comments

Comments
 (0)