You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Autocompletion on dynamic results with custom type hints
224
+
225
+
Typings are not working on methods with an dynamic result types like `Registry.getItemState`. To force a specific expected result type, you can annotate the variable like below.
226
+
227
+
```python
228
+
from org.openhab.core.library.types import DecimalType
@@ -279,4 +291,10 @@ You should also check your logs for a message related to the helper lib deployme
279
291
280
292
## Limitations
281
293
282
-
- GraalPy can't handle arguments in constructors of Java objects. Means you can't instantiate a Java object in Python with a parameter. <https://github.com/oracle/graalpython/issues/367>
294
+
### Avoid using datetime.strptime
295
+
296
+
You should avoid using `datetime.strptime` because there is a bug in GraalPy associated with it. Once this function is used, it can change the JVM-wide default time zone for the whole openHAB process until it is reset or openHAB is restarted.
297
+
298
+
### Constructors of Java objects
299
+
300
+
GraalPy can't handle arguments in constructors of Java objects. Means you can't instantiate a Java object in Python with a parameter. <https://github.com/oracle/graalpython/issues/367>
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/PythonScriptEngine.java
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@
29
29
importjava.util.Arrays;
30
30
importjava.util.HashSet;
31
31
importjava.util.List;
32
+
importjava.util.Map;
32
33
importjava.util.Set;
33
34
importjava.util.concurrent.locks.Lock;
34
35
importjava.util.concurrent.locks.ReentrantLock;
@@ -291,7 +292,7 @@ public void accept(Path path) {
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/console/PythonConsoleCommandExtension.java
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/console/handler/TypingCmd.java
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/console/handler/typing/ClassConverter.java
+29-27Lines changed: 29 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ public int compare(MethodContainer o1, MethodContainer o2) {
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/provider/ScriptExtensionModuleProvider.java
0 commit comments