Skip to content

Commit d511c94

Browse files
committed
Better formatting.
1 parent 735d965 commit d511c94

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public abstract static class StrfTimeNode extends PythonBuiltinNode {
240240
@Child private CastToIntegerFromIntNode castIntNode;
241241

242242
@CompilationFinal private ConditionProfile outOfRangeProfile;
243-
243+
244244
private CastToIntegerFromIntNode getCastIntNode() {
245245
if (castIntNode == null) {
246246
CompilerDirectives.transferToInterpreterAndInvalidate();
@@ -250,7 +250,7 @@ private CastToIntegerFromIntNode getCastIntNode() {
250250
}
251251
return castIntNode;
252252
}
253-
253+
254254
private ConditionProfile getOutOfRangeProfile() {
255255
if (outOfRangeProfile == null) {
256256
CompilerDirectives.transferToInterpreterAndInvalidate();
@@ -297,8 +297,8 @@ private static String twoDigit(int i) {
297297

298298
public int[] checkStructtime(PTuple time) {
299299
Object[] date = time.getArray();
300-
if(date.length < 9) {
301-
throw raise(PythonBuiltinClassType.TypeError, "function takes at least 9 arguments (%d given)", date.length);
300+
if (date.length < 9) {
301+
throw raise(PythonBuiltinClassType.TypeError, "function takes at least 9 arguments (%d given)", date.length);
302302
}
303303
int year = getIntValue(getCastIntNode().execute(date[0]), Integer.MIN_VALUE, Integer.MAX_VALUE, "year");
304304
int mon = getIntValue(getCastIntNode().execute(date[1]), 0, 12, "month out of range");
@@ -312,7 +312,8 @@ public int[] checkStructtime(PTuple time) {
312312
int hour = getIntValue(getCastIntNode().execute(date[3]), 0, 23, "hour out of range");
313313
int min = getIntValue(getCastIntNode().execute(date[4]), 0, 59, "minute out of range");
314314
int sec = getIntValue(getCastIntNode().execute(date[5]), 0, 61, "seconds out of range");
315-
int wday = getIntValue(getCastIntNode().execute(date[6]), -1, Integer.MAX_VALUE, "1 when daylight savings time is in effect, and 0 when it is not. A value of -1 indicates that this is not known");
315+
int wday = getIntValue(getCastIntNode().execute(date[6]), -1, Integer.MAX_VALUE,
316+
"1 when daylight savings time is in effect, and 0 when it is not. A value of -1 indicates that this is not known");
316317
if (wday == -1) {
317318
wday = 6;
318319
} else if (wday > 6) {
@@ -567,12 +568,12 @@ public String formatTime(String format, @SuppressWarnings("unused") PNone time)
567568
public String formatTime(String format, PTuple time) {
568569
return format(format, time);
569570
}
570-
571+
571572
@Specialization
572573
public String formatTime(@SuppressWarnings("unused") String format, @SuppressWarnings("unused") Object time) {
573574
throw raise(PythonBuiltinClassType.TypeError, "Tuple or struct_time argument required");
574575
}
575-
576+
576577
@Fallback
577578
public String formatTime(Object format, @SuppressWarnings("unused") Object time) {
578579
throw raise(PythonBuiltinClassType.TypeError, "strftime() argument 1 must be str, not %p", format);

0 commit comments

Comments
 (0)