diff options
| author | Iwan Aucamp <aucampia@gmail.com> | 2022-08-24 21:00:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-24 21:00:53 +0200 |
| commit | d11a5eff3d1ca99fa6d63d432e2a53f48a3394a4 (patch) | |
| tree | 85cea82232244a2cc7b24fb772f92f3603a483fa /test/test_misc/test_plugins.py | |
| parent | 8a58ae80214b413cbf950cb23820b09442d8f682 (diff) | |
| download | rdflib-d11a5eff3d1ca99fa6d63d432e2a53f48a3394a4.tar.gz | |
feat: add type hints to `rdflib.query` and related (#2097)
Add type hints to `rdflib.query` and result format implementations, also
add/adjust ignores and type hints in other modules to accommodate the
changes.
This does not include any runtime changes.
Diffstat (limited to 'test/test_misc/test_plugins.py')
| -rw-r--r-- | test/test_misc/test_plugins.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_misc/test_plugins.py b/test/test_misc/test_plugins.py index 46147f5a..7263bc73 100644 --- a/test/test_misc/test_plugins.py +++ b/test/test_misc/test_plugins.py @@ -6,13 +6,14 @@ import sys import warnings from contextlib import ExitStack, contextmanager from pathlib import Path -from typing import Any, Callable, Dict, Generator, List +from typing import Any, Callable, Dict, Generator, List, cast import rdflib.plugin import rdflib.plugins.sparql import rdflib.plugins.sparql.evaluate from rdflib import Graph from rdflib.parser import Parser +from rdflib.query import ResultRow TEST_DIR = Path(__file__).parent.parent TEST_PLUGINS_DIR = TEST_DIR / "plugins" @@ -92,7 +93,7 @@ def test_sparqleval(tmp_path: Path, no_cover: None) -> None: logging.debug("query_string = %s", query_string) result = graph.query(query_string) assert result.type == "SELECT" - rows = list(result) + rows = cast(List[ResultRow], list(result)) logging.debug("rows = %s", rows) assert len(rows) == 1 assert len(rows[0]) == 1 |
