Skip to content

Commit bd6e43f

Browse files
committed
chore: removed isee generate-documentation from CI [skip ci]
1 parent e641659 commit bd6e43f

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ jobs:
7373
echo "VERSION=$VERSION" >> $GITHUB_ENV
7474
isee update-setup-cfg
7575
76-
- name: Generate Documentation
77-
run: isee generate-documentation
7876
7977
- name: Package
8078
run: python setup.py sdist

http2py/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22
import os
33
from pathlib import Path
4-
from typing import Iterable
4+
from collections.abc import Iterable
55

66
DFLT_CONFIG_FILENAME = os.path.join(Path.home(), ".http2py", "credentials.json")
77

http2py/cli_maker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
from pathlib import Path
88
import requests
9-
from typing import Callable, Iterable
9+
from collections.abc import Callable, Iterable
1010
import yaml
1111

1212
from i2.io_trans import JSONAnnotAndDfltIoTrans

http2py/example_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import argh
2-
from typing import Iterable
2+
from collections.abc import Iterable
33

44
from http2py.cli_maker import mk_argparse_friendly
55
from i2.io_trans import AnnotAndDfltIoTrans

http2py/py2request.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
from i2.signatures import set_signature_of_func, KO
6767

6868
DFLT_PORT = 5000
69-
DFLT_BASE_URL = "http://localhost:{port}".format(port=DFLT_PORT)
69+
DFLT_BASE_URL = f"http://localhost:{DFLT_PORT}"
7070
DFLT_REQUEST_METHOD = "post"
7171
DFLT_REQUEST_KWARGS = imdict({"method": DFLT_REQUEST_METHOD, "url": ""})
7272

@@ -227,7 +227,7 @@ def request_func(*args, **kwargs):
227227
if "url_template" in method_spec:
228228
url_template = method_spec["url_template"]
229229
# Check if the url template already has parameters, add them otherwise
230-
if query_arg_names and not re.search("^.*\?((.*=.*)(&?))+$", url_template):
230+
if query_arg_names and not re.search(r"^.*\?((.*=.*)(&?))+$", url_template):
231231
url_arg_parts = [f"{x}={{{x}}}" for x in query_arg_names if x in kwargs]
232232
url_args = "&".join(url_arg_parts)
233233
if url_args:
@@ -316,7 +316,7 @@ def request_func(self, *args, **kwargs):
316316
str_formatter = string.Formatter()
317317

318318

319-
class Py2Request(object):
319+
class Py2Request:
320320
"""Make a class that has methods that offer a python interface to web requests"""
321321

322322
def __init__(
@@ -653,8 +653,9 @@ def mk_method_spec_from_openapi_method_spec(
653653

654654
##### Open api stuff TODO: To move ###########################################
655655
from inspect import Parameter, Signature
656-
from typing import Union, Callable, Iterable
657-
from typing import Mapping as MappingType
656+
from typing import Union
657+
from collections.abc import Callable, Iterable
658+
from collections.abc import Mapping as MappingType
658659

659660
PK = Parameter.POSITIONAL_OR_KEYWORD
660661

@@ -755,7 +756,8 @@ def mk_request_func_from_openapi_spec(
755756
mk_request_function.from_openapi_spec = mk_request_func_from_openapi_spec
756757

757758

758-
from typing import Optional, Iterable, Dict, Tuple, Callable
759+
from typing import Optional, Dict, Tuple
760+
from collections.abc import Iterable, Callable
759761
from ju.oas import Routes
760762
from http2py.py2request import mk_request_func_from_openapi_spec
761763

@@ -773,12 +775,12 @@ def default_path_to_func_name(method: str, uri: str) -> str:
773775

774776
def openapi_to_py(
775777
openapi_spec: dict,
776-
paths: Optional[Iterable[Tuple[str, str]]] = None,
778+
paths: Iterable[tuple[str, str]] | None = None,
777779
*,
778780
path_to_func_name: Callable[[str, str], str] = default_path_to_func_name,
779-
servers: Optional[list] = None,
781+
servers: list | None = None,
780782
default_server_url: str = "http://localhost:8000",
781-
) -> Dict[str, Callable]:
783+
) -> dict[str, Callable]:
782784
"""
783785
Given an OpenAPI spec dict, returns a dict mapping function names to request functions.
784786
The `servers` argument overrides or provides a default for the OpenAPI servers field.

0 commit comments

Comments
 (0)