Commit 9579768a authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Solve leftover typing issues

parent 4cf572bf
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -92,7 +92,10 @@ repos:
  - id: mypy
    args: [--follow-imports=silent]
    additional_dependencies:
    - packaging >=21
    - types-orjson
    - types-requests
    - types-urllib3
    - trio-typing[mypy] ~=0.6
    - xdg ~=5.1
    - git+https://code.kodo.org.uk/dom/type-stubs.git#type-stubs[jsonpath,parse]
+2 −1
Original line number Diff line number Diff line
#  Copyright 2021  Dominik Sekotill <dom.sekotill@kodo.org.uk>
#  Copyright 2021,2022  Dominik Sekotill <dom.sekotill@kodo.org.uk>
#
#  This Source Code Form is subject to the terms of the Mozilla Public
#  License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -153,6 +153,7 @@ class DownloadableExecutable(ABC):
		version = self.version

		with requests.Session() as session:
			assert isinstance(session.hooks["response"], list)
			session.hooks["response"].append(lambda r, *a, **k: r.raise_for_status())

			if version == "latest":
+3 −3
Original line number Diff line number Diff line
#  Copyright 2021  Dominik Sekotill <dom.sekotill@kodo.org.uk>
#  Copyright 2021,2022  Dominik Sekotill <dom.sekotill@kodo.org.uk>
#
#  This Source Code Form is subject to the terms of the Mozilla Public
#  License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -16,8 +16,8 @@ from typing import Mapping
from urllib.parse import urlparse

import requests.adapters
from requests.packages.urllib3 import connection
from requests.packages.urllib3 import connectionpool
from urllib3 import connection
from urllib3 import connectionpool


def redirect(
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ parse = "~=1.19"
requests = "~=2.26"
trio = "~=0.20.0"
xdg = "~=5.1"
packaging = "~=21"
packaging = ">=21"


[tool.isort]