Skip to content

Commit 585c0e5

Browse files
committed
Refactor according to gates.
- Remove call to `Object.equals()` in `CSVModuleBuiltins`, as `NOT_SET` is a constant marker we set to indicate a not set value, comparing on object identity equality is applicable. - Remove double empty line in `CSVDialect`.
1 parent 04049a5 commit 585c0e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/csv/CSVDialect.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public CSVDialect(Object cls, Shape instanceShape) {
6868
super(cls, instanceShape);
6969
}
7070

71-
7271
public CSVDialect(Object cls, Shape instanceShape, String delimiter, boolean doubleQuote, String escapeChar,
7372
String lineTerminator, String quoteChar, QuoteStyle quoting, boolean skipInitialSpace,
7473
boolean strict) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/csv/CSVModuleBuiltins.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,9 @@ private String getCharOrNone(String attribute, Object valueObj, String defaultVa
543543
if (valueObj == PNone.NO_VALUE) {
544544
return defaultValue;
545545
}
546-
if (valueObj == PNone.NONE || valueObj.equals(NOT_SET)) {
546+
if (valueObj == PNone.NONE || valueObj == NOT_SET) {
547547
return NOT_SET;
548+
548549
}
549550

550551
return getChar(attribute, valueObj, defaultValue, getType, castToJavaStringNode);

0 commit comments

Comments
 (0)