Skip to content

Commit d20468a

Browse files
committed
Fix style
1 parent ed9456e commit d20468a

File tree

7 files changed

+8
-11
lines changed

7 files changed

+8
-11
lines changed

graalpython/com.oracle.graal.python.test/src/org/graalvm/python/embedding/cext/test/MultiContextCExtTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public void testCreatingVenvForMulticontext() throws IOException {
214214
assertEquals("tiny_sha3", r2.asString());
215215
c2.eval("python", "import _sha3; _sha3.implementation = '12'");
216216
r2 = c2.eval(code);
217-
assertEquals(".dup2", r2.asString());
217+
assertEquals("12", r2.asString());
218218
// first context is unaffected
219219
r1 = c1.eval(code);
220220
assertEquals("tiny_sha3", r1.asString());

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/CApiContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ private static String dlopenFlagsToString(int flags) {
10491049
* @param spec The name and path of the module (also containing the original module spec
10501050
* object).
10511051
* @param checkFunctionResultNode A node to check that the function result does not indicate
1052-
* that an exception was raised on the native side. It should be an adopted node,
1052+
* that an exception was raised on the native side. It should be an adopted node,
10531053
* because only an adopted node will report useful source locations.
10541054
* @return A Python module.
10551055
* @throws IOException If the specified file cannot be loaded.

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/copying/NativeLibraryLocator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public final class NativeLibraryLocator {
8080
*/
8181
private static final AtomicInteger CEXT_COPY_INDICES = new AtomicInteger(MAX_CEXT_COPIES);
8282

83-
8483
/**
8584
* The suffix to add to C extensions when loading. This allows us to support native module
8685
* isolation with {@link PythonOptions#IsolateNativeModules}. If the value is {@code -1}, it
@@ -151,8 +150,8 @@ public void close() {
151150
public static void replicate(TruffleFile venvDirectory, PythonContext context, int count) throws IOException, InterruptedException {
152151
if (count > MAX_CEXT_COPIES) {
153152
LOGGER.warning(() -> String.format("The current limit for concurrent Python contexts accessing the Python C API is %d, " +
154-
"but we are preparing %d copies. The extra copies will only be used if a different value " +
155-
"of the system property %s is set.", MAX_CEXT_COPIES, count, J_MAX_CAPI_COPIES));
153+
"but we are preparing %d copies. The extra copies will only be used if a different value " +
154+
"of the system property %s is set.", MAX_CEXT_COPIES, count, J_MAX_CAPI_COPIES));
156155
}
157156
String suffix = context.getSoAbi().toJavaStringUncached();
158157
TruffleFile capiLibrary = context.getPublicTruffleFileRelaxed(context.getCAPIHome()).resolve(PythonContext.getSupportLibName("python-" + J_NATIVE));

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/copying/PEFile.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
package com.oracle.graal.python.builtins.objects.cext.copying;
4343

4444
import java.io.IOException;
45-
import java.io.OutputStream;
46-
import java.nio.file.CopyOption;
4745
import java.nio.file.StandardCopyOption;
4846
import java.nio.file.StandardOpenOption;
4947

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/copying/SharedObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ abstract class SharedObject implements AutoCloseable {
5555

5656
abstract void write(TruffleFile copy) throws IOException, InterruptedException;
5757

58-
abstract public void close() throws IOException, InterruptedException;
58+
public abstract void close() throws IOException, InterruptedException;
5959

6060
static SharedObject open(TruffleFile file, PythonContext context) throws IOException {
6161
var f = file.readAllBytes();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/ErrorMessages.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,8 @@ public abstract class ErrorMessages {
16701670
public static final TruffleString ARROW_ARRAY_ALREADY_RELEASED = tsLiteral("Cannot release already released ArrowArray");
16711671
public static final TruffleString ARROW_SCHEMA_ALREADY_RELEASED = tsLiteral("Cannot release already released ArrowSchema");
16721672
public static final TruffleString CAPI_ISOLATION_CAPPED_AT_D = tsLiteral(
1673-
"There is no available slot for C API isolation. The current limit for concurrent Python contexts accessing the Python C API is %d. This can be changed with the" + J_MAX_CAPI_COPIES + " System property.");
1673+
"There is no available slot for C API isolation. The current limit for concurrent Python contexts accessing the Python C API is %d. This can be changed with the" +
1674+
J_MAX_CAPI_COPIES + " System property.");
16741675
public static final TruffleString SYS_PREFIX_MUST_BE_STRING_NOT_P_FOR_CAPI_ISOLATION = tsLiteral(
16751676
"The sys.prefix must be a str, not '%p' when the `IsolateNativeModules' option is used, because it is the base path for searching the relocated C API. " +
16761677
"Refer to https://www.graalvm.org/latest/reference-manual/python/Native-Extensions for details on native module isolation.");

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonOptions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ private PythonOptions() {
348348
@Option(category = OptionCategory.EXPERT, usageSyntax = "true|false", help = "Whether C extension modules should be loaded as native code (as opposed to LLVM bitcode execution).") //
349349
public static final OptionKey<Boolean> NativeModules = new OptionKey<>(true);
350350

351-
@Option(category = OptionCategory.USER, stability = OptionStability.EXPERIMENTAL, usageSyntax = "true|false",
352-
help = "Whether the context should isolate its loading of C extension modules. " +
351+
@Option(category = OptionCategory.USER, stability = OptionStability.EXPERIMENTAL, usageSyntax = "true|false", help = "Whether the context should isolate its loading of C extension modules. " +
353352
"This allows more than one context to access C extensions. " +
354353
"Note that all contexts in the operating system process must set this option to true to cooperatively allow this feature to work.") //
355354
public static final OptionKey<Boolean> IsolateNativeModules = new OptionKey<>(false);

0 commit comments

Comments
 (0)