Skip to content

Commit 087b696

Browse files
committed
Typo and small correction in UnicodeDataModuleBuiltins
1 parent 07b2cb0 commit 087b696

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Object call(TruffleObject callable, Object[] arguments,
265265
// TODO This is a hack. The right solution would be to fix it
266266
// in
267267
// com.oracle.truffle.regex.RegexEngine.RegexEngineMessageResolution.RegexEngineExecuteNode
268-
// where is only check whether the argumen is instance of String.
268+
// where is only check whether the argument is instance of String.
269269
// PString should be there unboxed.
270270
for (int i = 0; i < arguments.length; i++) {
271271
if (arguments[i] instanceof PString) {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ public String normalize(@SuppressWarnings("unused") String form, String unistr,
9191
public String normalize(@SuppressWarnings("unused") String form, PString unistr,
9292
@SuppressWarnings("unused") @Cached("form") String cachedForm,
9393
@Cached("getForm(cachedForm)") Normalizer.Form cachedNormForm) {
94-
if (cachedNormForm == null) {
95-
throw raise(ValueError, "invalid normalization form");
96-
}
97-
return Normalizer.normalize(unistr.getValue(), cachedNormForm);
94+
return normalize(form, unistr.getValue(), cachedForm, cachedNormForm);
9895
}
9996

10097
}

0 commit comments

Comments
 (0)