summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-03-06 23:03:54 +0100
committerGitHub <noreply@github.com>2023-03-06 23:03:54 +0100
commita146e0a066df3f85176226c9e826bd181389049c (patch)
treed932648e2dcb1251f44770fa84b433d06ba29e6f
parent889e8c94b3a12c579fbf9fd25d24c18cb7ce2987 (diff)
downloadrdflib-a146e0a066df3f85176226c9e826bd181389049c.tar.gz
build(deps-dev): bump mypy from 0.991 to 1.0.1 (#2247)
* build(deps-dev): bump mypy from 0.991 to 1.0.1 Bumps [mypy](https://github.com/python/mypy) from 0.991 to 1.0.1. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.991...v1.0.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix type errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
-rw-r--r--poetry.lock60
-rw-r--r--pyproject.toml2
-rw-r--r--rdflib/graph.py3
-rw-r--r--rdflib/parser.py2
-rw-r--r--test/test_graph/test_graph_http.py4
-rw-r--r--test/test_serializers/test_serializer.py3
-rw-r--r--test/utils/__init__.py3
-rw-r--r--test/utils/httpservermock.py2
8 files changed, 39 insertions, 40 deletions
diff --git a/poetry.lock b/poetry.lock
index a0f5b1b6..b2e228ff 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -749,42 +749,38 @@ files = [
[[package]]
name = "mypy"
-version = "0.991"
+version = "1.0.1"
description = "Optional static typing for Python"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
- {file = "mypy-0.991-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7d17e0a9707d0772f4a7b878f04b4fd11f6f5bcb9b3813975a9b13c9332153ab"},
- {file = "mypy-0.991-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0714258640194d75677e86c786e80ccf294972cc76885d3ebbb560f11db0003d"},
- {file = "mypy-0.991-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0c8f3be99e8a8bd403caa8c03be619544bc2c77a7093685dcf308c6b109426c6"},
- {file = "mypy-0.991-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc9ec663ed6c8f15f4ae9d3c04c989b744436c16d26580eaa760ae9dd5d662eb"},
- {file = "mypy-0.991-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4307270436fd7694b41f913eb09210faff27ea4979ecbcd849e57d2da2f65305"},
- {file = "mypy-0.991-cp310-cp310-win_amd64.whl", hash = "sha256:901c2c269c616e6cb0998b33d4adbb4a6af0ac4ce5cd078afd7bc95830e62c1c"},
- {file = "mypy-0.991-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d13674f3fb73805ba0c45eb6c0c3053d218aa1f7abead6e446d474529aafc372"},
- {file = "mypy-0.991-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1c8cd4fb70e8584ca1ed5805cbc7c017a3d1a29fb450621089ffed3e99d1857f"},
- {file = "mypy-0.991-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:209ee89fbb0deed518605edddd234af80506aec932ad28d73c08f1400ef80a33"},
- {file = "mypy-0.991-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37bd02ebf9d10e05b00d71302d2c2e6ca333e6c2a8584a98c00e038db8121f05"},
- {file = "mypy-0.991-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:26efb2fcc6b67e4d5a55561f39176821d2adf88f2745ddc72751b7890f3194ad"},
- {file = "mypy-0.991-cp311-cp311-win_amd64.whl", hash = "sha256:3a700330b567114b673cf8ee7388e949f843b356a73b5ab22dd7cff4742a5297"},
- {file = "mypy-0.991-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:1f7d1a520373e2272b10796c3ff721ea1a0712288cafaa95931e66aa15798813"},
- {file = "mypy-0.991-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:641411733b127c3e0dab94c45af15fea99e4468f99ac88b39efb1ad677da5711"},
- {file = "mypy-0.991-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3d80e36b7d7a9259b740be6d8d906221789b0d836201af4234093cae89ced0cd"},
- {file = "mypy-0.991-cp37-cp37m-win_amd64.whl", hash = "sha256:e62ebaad93be3ad1a828a11e90f0e76f15449371ffeecca4a0a0b9adc99abcef"},
- {file = "mypy-0.991-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b86ce2c1866a748c0f6faca5232059f881cda6dda2a893b9a8373353cfe3715a"},
- {file = "mypy-0.991-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac6e503823143464538efda0e8e356d871557ef60ccd38f8824a4257acc18d93"},
- {file = "mypy-0.991-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0cca5adf694af539aeaa6ac633a7afe9bbd760df9d31be55ab780b77ab5ae8bf"},
- {file = "mypy-0.991-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a12c56bf73cdab116df96e4ff39610b92a348cc99a1307e1da3c3768bbb5b135"},
- {file = "mypy-0.991-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:652b651d42f155033a1967739788c436491b577b6a44e4c39fb340d0ee7f0d70"},
- {file = "mypy-0.991-cp38-cp38-win_amd64.whl", hash = "sha256:4175593dc25d9da12f7de8de873a33f9b2b8bdb4e827a7cae952e5b1a342e243"},
- {file = "mypy-0.991-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:98e781cd35c0acf33eb0295e8b9c55cdbef64fcb35f6d3aa2186f289bed6e80d"},
- {file = "mypy-0.991-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6d7464bac72a85cb3491c7e92b5b62f3dcccb8af26826257760a552a5e244aa5"},
- {file = "mypy-0.991-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c9166b3f81a10cdf9b49f2d594b21b31adadb3d5e9db9b834866c3258b695be3"},
- {file = "mypy-0.991-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8472f736a5bfb159a5e36740847808f6f5b659960115ff29c7cecec1741c648"},
- {file = "mypy-0.991-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e80e758243b97b618cdf22004beb09e8a2de1af481382e4d84bc52152d1c476"},
- {file = "mypy-0.991-cp39-cp39-win_amd64.whl", hash = "sha256:74e259b5c19f70d35fcc1ad3d56499065c601dfe94ff67ae48b85596b9ec1461"},
- {file = "mypy-0.991-py3-none-any.whl", hash = "sha256:de32edc9b0a7e67c2775e574cb061a537660e51210fbf6006b0b36ea695ae9bb"},
- {file = "mypy-0.991.tar.gz", hash = "sha256:3c0165ba8f354a6d9881809ef29f1a9318a236a6d81c690094c5df32107bde06"},
+ {file = "mypy-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:71a808334d3f41ef011faa5a5cd8153606df5fc0b56de5b2e89566c8093a0c9a"},
+ {file = "mypy-1.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:920169f0184215eef19294fa86ea49ffd4635dedfdea2b57e45cb4ee85d5ccaf"},
+ {file = "mypy-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27a0f74a298769d9fdc8498fcb4f2beb86f0564bcdb1a37b58cbbe78e55cf8c0"},
+ {file = "mypy-1.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:65b122a993d9c81ea0bfde7689b3365318a88bde952e4dfa1b3a8b4ac05d168b"},
+ {file = "mypy-1.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5deb252fd42a77add936b463033a59b8e48eb2eaec2976d76b6878d031933fe4"},
+ {file = "mypy-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2013226d17f20468f34feddd6aae4635a55f79626549099354ce641bc7d40262"},
+ {file = "mypy-1.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:48525aec92b47baed9b3380371ab8ab6e63a5aab317347dfe9e55e02aaad22e8"},
+ {file = "mypy-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c96b8a0c019fe29040d520d9257d8c8f122a7343a8307bf8d6d4a43f5c5bfcc8"},
+ {file = "mypy-1.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:448de661536d270ce04f2d7dddaa49b2fdba6e3bd8a83212164d4174ff43aa65"},
+ {file = "mypy-1.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:d42a98e76070a365a1d1c220fcac8aa4ada12ae0db679cb4d910fabefc88b994"},
+ {file = "mypy-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e64f48c6176e243ad015e995de05af7f22bbe370dbb5b32bd6988438ec873919"},
+ {file = "mypy-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fdd63e4f50e3538617887e9aee91855368d9fc1dea30da743837b0df7373bc4"},
+ {file = "mypy-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbeb24514c4acbc78d205f85dd0e800f34062efcc1f4a4857c57e4b4b8712bff"},
+ {file = "mypy-1.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a2948c40a7dd46c1c33765718936669dc1f628f134013b02ff5ac6c7ef6942bf"},
+ {file = "mypy-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5bc8d6bd3b274dd3846597855d96d38d947aedba18776aa998a8d46fabdaed76"},
+ {file = "mypy-1.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:17455cda53eeee0a4adb6371a21dd3dbf465897de82843751cf822605d152c8c"},
+ {file = "mypy-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e831662208055b006eef68392a768ff83596035ffd6d846786578ba1714ba8f6"},
+ {file = "mypy-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e60d0b09f62ae97a94605c3f73fd952395286cf3e3b9e7b97f60b01ddfbbda88"},
+ {file = "mypy-1.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:0af4f0e20706aadf4e6f8f8dc5ab739089146b83fd53cb4a7e0e850ef3de0bb6"},
+ {file = "mypy-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24189f23dc66f83b839bd1cce2dfc356020dfc9a8bae03978477b15be61b062e"},
+ {file = "mypy-1.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93a85495fb13dc484251b4c1fd7a5ac370cd0d812bbfc3b39c1bafefe95275d5"},
+ {file = "mypy-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f546ac34093c6ce33f6278f7c88f0f147a4849386d3bf3ae193702f4fe31407"},
+ {file = "mypy-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6c2ccb7af7154673c591189c3687b013122c5a891bb5651eca3db8e6c6c55bd"},
+ {file = "mypy-1.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:15b5a824b58c7c822c51bc66308e759243c32631896743f030daf449fe3677f3"},
+ {file = "mypy-1.0.1-py3-none-any.whl", hash = "sha256:eda5c8b9949ed411ff752b9a01adda31afe7eae1e53e946dbdf9db23865e66c4"},
+ {file = "mypy-1.0.1.tar.gz", hash = "sha256:28cea5a6392bb43d266782983b5a4216c25544cd7d80be681a155ddcdafd152d"},
]
[package.dependencies]
@@ -1506,4 +1502,4 @@ networkx = ["networkx"]
[metadata]
lock-version = "2.0"
python-versions = "^3.7"
-content-hash = "9d02b28eb490584cc2bd1accb2006ea12ee19991511dadf9971204c9697c235f"
+content-hash = "d1559b8590d458543d8c3a6a98895f877da46b04ef88f8716924d5c668b4e985"
diff --git a/pyproject.toml b/pyproject.toml
index a187f950..16560246 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -43,7 +43,7 @@ lxml = {version = "^4.3.0", optional = true}
[tool.poetry.group.dev.dependencies]
black = "22.12.0"
isort = "^5.10.0"
-mypy = "0.991"
+mypy = "1.0.1"
lxml-stubs = "^0.4.0"
[tool.poetry.group.tests.dependencies]
diff --git a/rdflib/graph.py b/rdflib/graph.py
index 3f6462b6..d3fa7fdc 100644
--- a/rdflib/graph.py
+++ b/rdflib/graph.py
@@ -1536,8 +1536,7 @@ class Graph(Node):
except NotImplementedError:
pass # store has no own implementation
- # type error: Subclass of "str" and "Result" cannot exist: would have incompatible method signatures
- if not isinstance(result, query.Result): # type: ignore[unreachable]
+ if not isinstance(result, query.Result):
result = plugin.get(cast(str, result), query.Result)
if not isinstance(processor, query.Processor):
processor = plugin.get(processor, query.Processor)(self)
diff --git a/rdflib/parser.py b/rdflib/parser.py
index 4f8505d9..85625d08 100644
--- a/rdflib/parser.py
+++ b/rdflib/parser.py
@@ -372,7 +372,7 @@ def create_input_source(
location = str(source)
elif isinstance(source, bytes):
data = source
- elif hasattr(source, "read") and not isinstance(source, Namespace): # type: ignore[unreachable]
+ elif hasattr(source, "read") and not isinstance(source, Namespace):
f = source
input_source = InputSource()
if hasattr(source, "encoding"):
diff --git a/test/test_graph/test_graph_http.py b/test/test_graph/test_graph_http.py
index fec5a286..b026a474 100644
--- a/test/test_graph/test_graph_http.py
+++ b/test/test_graph/test_graph_http.py
@@ -108,6 +108,8 @@ class TestGraphHTTP:
with ctx_http_server(ContentNegotiationHandler) as server:
(host, port) = server.server_address
+ if isinstance(host, (bytes, bytearray)):
+ host = host.decode("utf-8")
url = f"http://{host}:{port}/foo"
for format in ("xml", "n3", "nt"):
graph = Graph()
@@ -121,6 +123,8 @@ class TestGraphHTTP:
with ctx_http_server(ContentNegotiationHandler) as server:
(host, port) = server.server_address
+ if isinstance(host, (bytes, bytearray)):
+ host = host.decode("utf-8")
url = f"http://{host}:{port}/foo"
graph = Graph()
graph.parse(url)
diff --git a/test/test_serializers/test_serializer.py b/test/test_serializers/test_serializer.py
index 87e1e94e..549a21be 100644
--- a/test/test_serializers/test_serializer.py
+++ b/test/test_serializers/test_serializer.py
@@ -208,8 +208,7 @@ GraphDestParamType = Union[Path, PurePath, str, IO[bytes]]
def narrow_dest_param(param: DestParmType) -> GraphDestParamType:
assert not (hasattr(param, "write") and hasattr(param, "encoding"))
- # type error: Subclass of "IO[bytes]" and "TextIO" cannot exist: would have inconsistent method resolution order
- assert not isinstance(param, TextIO) # type: ignore[unreachable]
+ assert not isinstance(param, TextIO)
return param
diff --git a/test/utils/__init__.py b/test/utils/__init__.py
index 8f624b95..0e0bc9e4 100644
--- a/test/utils/__init__.py
+++ b/test/utils/__init__.py
@@ -218,8 +218,7 @@ class GraphHelper:
for sn, pn, on, gn in graph.quads((None, None, None, None)):
gn_id: Identifier
if isinstance(graph, Dataset):
- # type error: Subclass of "Graph" and "Identifier" cannot exist: would have incompatible method signatures
- assert isinstance(gn, Identifier) # type: ignore[unreachable]
+ assert isinstance(gn, Identifier)
gn_id = gn # type: ignore[unreachable]
elif isinstance(graph, ConjunctiveGraph):
assert isinstance(gn, Graph)
diff --git a/test/utils/httpservermock.py b/test/utils/httpservermock.py
index 60592f2e..932c1b88 100644
--- a/test/utils/httpservermock.py
+++ b/test/utils/httpservermock.py
@@ -191,6 +191,8 @@ class ServedBaseHTTPServerMock(
@property
def address_string(self) -> str:
(host, port) = self.server.server_address
+ if isinstance(host, (bytes, bytearray)):
+ host = host.decode("utf-8")
return f"{host}:{port}"
@property