We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f895574 commit 0681348Copy full SHA for 0681348
sparql_file/__init__.py
@@ -6,11 +6,14 @@
6
7
def sparql_file(
8
graph_file: str,
9
- example_query: str = DEFAULT_EXAMPLE_QUERY,
+ example_query: str | None = None,
10
graph_format: str | None = None,
11
):
12
g = Graph()
13
14
+ if example_query is None:
15
+ example_query = DEFAULT_EXAMPLE_QUERY
16
+
17
with open(graph_file, "r") as graph_file_io:
18
g.parse(source=graph_file_io, format=None)
19
sparql_file/env.py
@@ -3,8 +3,6 @@
3
from . import sparql_file
4
5
GRAPH_FILE = os.getenv("GRAPH_FILE")
-EXAMPLE_QUERY = os.getenv(
- "EXAMPLE_QUERY",
-)
+EXAMPLE_QUERY = os.getenv("EXAMPLE_QUERY")
app = sparql_file(GRAPH_FILE, EXAMPLE_QUERY)
0 commit comments