Skip to content

Commit e6f05d2

Browse files
committed
Fix style gate
1 parent 325b442 commit e6f05d2

4 files changed

Lines changed: 23 additions & 22 deletions

File tree

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/PythonBuiltinClassType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,9 +988,9 @@ accepted by asctime(), mktime() and strftime(). May be considered as a
988988
989989
Type used to pass arguments to sys.unraisablehook.""")),
990990
PExceptHookArgs(
991-
"_ExceptHookArgs",
992-
PTuple,
993-
newBuilder().publishInModule(J__THREAD).slots(StructSequenceBuiltins.SLOTS, InstantiableStructSequenceBuiltins.SLOTS).doc("""
991+
"_ExceptHookArgs",
992+
PTuple,
993+
newBuilder().publishInModule(J__THREAD).slots(StructSequenceBuiltins.SLOTS, InstantiableStructSequenceBuiltins.SLOTS).doc("""
994994
_ExceptHookArgs
995995
996996
Type used to pass arguments to _thread._excepthook.""")),

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ThreadModuleBuiltins.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -109,13 +109,13 @@
109109
public final class ThreadModuleBuiltins extends PythonBuiltins {
110110

111111
public static final StructSequence.BuiltinTypeDescriptor EXCEPTHOOK_ARGS_DESC = new StructSequence.BuiltinTypeDescriptor(
112-
PythonBuiltinClassType.PExceptHookArgs,
113-
4,
114-
new String[]{
115-
"exc_type", "exc_value", "exc_traceback", "thread"},
116-
new String[]{
117-
"Exception type", "Exception value", "Exception traceback",
118-
"Exception thread"});
112+
PythonBuiltinClassType.PExceptHookArgs,
113+
4,
114+
new String[]{
115+
"exc_type", "exc_value", "exc_traceback", "thread"},
116+
new String[]{
117+
"Exception type", "Exception value", "Exception traceback",
118+
"Exception thread"});
119119

120120
@Override
121121
protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFactories() {
@@ -200,22 +200,23 @@ abstract static class GetThreadExceptHookNode extends PythonBinaryBuiltinNode {
200200
@Specialization
201201
@TruffleBoundary
202202
Object getExceptHook(PythonModule self,
203-
Object exceptHookArgs,
204-
@Cached PRaiseNode raiseNode) {
203+
Object exceptHookArgs,
204+
@Cached PRaiseNode raiseNode) {
205205

206206
Object argsType = GetClassNode.GetPythonObjectClassNode.executeUncached((PythonObject) exceptHookArgs);
207-
if (!TypeNodes.IsSameTypeNode.executeUncached(argsType, PythonBuiltinClassType.PExceptHookArgs))
207+
if (!TypeNodes.IsSameTypeNode.executeUncached(argsType, PythonBuiltinClassType.PExceptHookArgs)) {
208208
throw PRaiseNode.getUncached().raise(raiseNode, PythonBuiltinClassType.TypeError, ErrorMessages.ARG_TYPE_MUST_BE, "_thread.excepthook", "ExceptHookArgs");
209-
209+
}
210210
SequenceStorage seq = ((PTuple) exceptHookArgs).getSequenceStorage();
211-
if (seq.length() != 4)
211+
if (seq.length() != 4) {
212212
throw PRaiseNode.getUncached().raise(raiseNode, PythonBuiltinClassType.TypeError, ErrorMessages.TAKES_EXACTLY_D_ARGUMENTS_D_GIVEN, 4, seq.length());
213+
}
213214

214215
Object excType = SequenceStorageNodes.GetItemScalarNode.executeUncached(seq, 0);
215216

216-
if (TypeNodes.IsSameTypeNode.executeUncached(excType, PythonBuiltinClassType.SystemExit))
217+
if (TypeNodes.IsSameTypeNode.executeUncached(excType, PythonBuiltinClassType.SystemExit)) {
217218
return PNone.NONE;
218-
219+
}
219220
Object excValue = SequenceStorageNodes.GetItemScalarNode.executeUncached(seq, 1);
220221
Object excTraceback = SequenceStorageNodes.GetItemScalarNode.executeUncached(seq, 2);
221222
Object thread = SequenceStorageNodes.GetItemScalarNode.executeUncached(seq, 3);
@@ -238,9 +239,9 @@ Object getExceptHook(PythonModule self,
238239
pw.printf("Exception in thread %s:\n", name);
239240

240241
PException pException;
241-
if (excValue instanceof PException)
242+
if (excValue instanceof PException) {
242243
pException = (PException) excValue;
243-
else if (excValue instanceof PBaseException base) {
244+
} else if (excValue instanceof PBaseException base) {
244245
pException = PException.fromObject(base, base.getException().getLocation(), false);
245246
pException.materializeMessage();
246247
} else {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/tuple/InstantiableStructSequenceBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/tuple/StructSequenceBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

0 commit comments

Comments
 (0)