Skip to content

Commit 1ba3ed4

Browse files
committed
shakes fist at trailing spaces from claude
1 parent 1b83faf commit 1ba3ed4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Lib/test/test_traceback_timestamps/shared_utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ def create_exception_instance(exc_class_name):
104104
exc_class = getattr(__builtins__, exc_class_name)
105105
else:
106106
exc_class = getattr(sys.modules['builtins'], exc_class_name)
107-
107+
108108
# Create exception with appropriate arguments
109-
if exc_class_name in ('OSError', 'IOError', 'PermissionError', 'FileNotFoundError',
109+
if exc_class_name in ('OSError', 'IOError', 'PermissionError', 'FileNotFoundError',
110110
'FileExistsError', 'IsADirectoryError', 'NotADirectoryError',
111111
'InterruptedError', 'ChildProcessError', 'ConnectionError',
112112
'BrokenPipeError', 'ConnectionAbortedError', 'ConnectionRefusedError',
@@ -143,13 +143,13 @@ def test_exception_pickle(exc_class_name, with_timestamps=False):
143143
try:
144144
exc = create_exception_instance(exc_class_name)
145145
exc.custom_attr = "custom_value"
146-
146+
147147
if with_timestamps:
148148
exc.__timestamp_ns__ = 1234567890123456789
149-
149+
150150
pickled_data = pickle.dumps(exc, protocol=0)
151151
unpickled_exc = pickle.loads(pickled_data)
152-
152+
153153
result = {{
154154
'exception_type': type(unpickled_exc).__name__,
155155
'message': str(unpickled_exc),
@@ -159,7 +159,7 @@ def test_exception_pickle(exc_class_name, with_timestamps=False):
159159
'timestamp_value': getattr(unpickled_exc, '__timestamp_ns__', None),
160160
}}
161161
print(json.dumps(result))
162-
162+
163163
except Exception as e:
164164
error_result = {{'error': str(e), 'error_type': type(e).__name__}}
165165
print(json.dumps(error_result))
@@ -186,11 +186,11 @@ def test_exception_timestamp(exc_class_name):
186186
except BaseException as exc:
187187
has_timestamp = hasattr(exc, '__timestamp_ns__')
188188
timestamp_value = getattr(exc, '__timestamp_ns__', None)
189-
189+
190190
traceback_io = io.StringIO()
191191
traceback.print_exc(file=traceback_io)
192192
traceback_output = traceback_io.getvalue()
193-
193+
194194
result = {{
195195
'exception_type': type(exc).__name__,
196196
'has_timestamp_attr': has_timestamp,
@@ -200,7 +200,7 @@ def test_exception_timestamp(exc_class_name):
200200
'traceback_output': traceback_output
201201
}}
202202
print(json.dumps(result))
203-
203+
204204
except Exception as e:
205205
error_result = {{'error': str(e), 'error_type': type(e).__name__}}
206206
print(json.dumps(error_result))

Lib/test/test_traceback_timestamps/test_user_exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ def test_user_exception(exc_class_name):
3535
exc_class = globals()[exc_class_name]
3636
exc = exc_class(2, "No such file or directory") if exc_class_name == 'MyOSError' else exc_class()
3737
exc.extra_attr = "extra_value"
38-
38+
3939
pickled_data = pickle.dumps(exc, protocol=0)
4040
unpickled_exc = pickle.loads(pickled_data)
41-
41+
4242
result = {
4343
'exception_type': type(unpickled_exc).__name__,
4444
'base_class': type(unpickled_exc).__bases__[0].__name__,
@@ -50,7 +50,7 @@ def test_user_exception(exc_class_name):
5050
'is_instance_of_base': isinstance(unpickled_exc, exc_class.__bases__[0])
5151
}
5252
print(json.dumps(result))
53-
53+
5454
except Exception as e:
5555
print(json.dumps({'error': str(e), 'error_type': type(e).__name__}))
5656

0 commit comments

Comments
 (0)