From d19eeb1968084e7176dc7e4a99d0981eee34b23a Mon Sep 17 00:00:00 2001
From: eliott <eliott.sammier@tetras-libre.fr>
Date: Wed, 31 Jul 2024 13:29:28 +0200
Subject: [PATCH] Fix Pyright ignore rule on export_corese.py

---
 tetras_extraction/script/pyrightconfig.json   | 5 ++++-
 tetras_extraction/script/src/export_corese.py | 3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tetras_extraction/script/pyrightconfig.json b/tetras_extraction/script/pyrightconfig.json
index 5f26bcac..c598256a 100644
--- a/tetras_extraction/script/pyrightconfig.json
+++ b/tetras_extraction/script/pyrightconfig.json
@@ -10,5 +10,8 @@
     "reportUnknownArgumentType": "none",
     "reportUnknownVariableType": "none",
     "reportUnknownMemberType": "none",
-    "reportAny": "none"
+    "reportAny": "none",
+    "ignore": [
+        "src/export_corese.py"
+    ]
 }
\ No newline at end of file
diff --git a/tetras_extraction/script/src/export_corese.py b/tetras_extraction/script/src/export_corese.py
index b5302baa..01d718b0 100644
--- a/tetras_extraction/script/src/export_corese.py
+++ b/tetras_extraction/script/src/export_corese.py
@@ -1,6 +1,7 @@
 # type: ignore
 # This module isolates calls to Corese via the py4j interface,
 # because py4j has no stubs and pretty much breaks type checkers.
+# This is also declared in pyrightconfig.json
 
 import atexit
 import subprocess
@@ -36,8 +37,6 @@ def apply_templates() -> str:
     Graph = gateway.jvm.fr.inria.corese.core.Graph
     Load = gateway.jvm.fr.inria.corese.core.load.Load
     Property = gateway.jvm.fr.inria.corese.core.util.Property
-    QueryProcess = gateway.jvm.fr.inria.corese.core.query.QueryProcess
-    RDF = gateway.jvm.fr.inria.corese.core.logic.RDF
     Transformer = gateway.jvm.fr.inria.corese.core.transform.Transformer
 
     # ==> Create graph, load ontology
-- 
GitLab