Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Nov 3, 2022
1 parent 570c623 commit a31583a
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 21 deletions.
19 changes: 14 additions & 5 deletions src/zeep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from zeep.client import AsyncClient as AsyncClient, CachingClient as CachingClient, Client as Client # noqa
from zeep.plugins import Plugin as Plugin # noqa
from zeep.settings import Settings as Settings # noqa
from zeep.transports import Transport as Transport # noqa
from zeep.xsd.valueobjects import AnyObject as AnyObject # noqa
from zeep.client import AsyncClient, CachingClient, Client
from zeep.plugins import Plugin
from zeep.settings import Settings
from zeep.transports import Transport
from zeep.xsd.valueobjects import AnyObject

__version__ = "4.1.0"
__all__ = [
"AsyncClient",
"CachingClient",
"Client",
"Plugin",
"Settings",
"Transport",
"AnyObject",
]
4 changes: 3 additions & 1 deletion src/zeep/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def parse_xml(content: str, transport, base_url=None, settings=None):
)


def load_external(url: typing.Union[typing.IO, str], transport, base_url=None, settings=None):
def load_external(
url: typing.Union[typing.IO, str], transport, base_url=None, settings=None
):
"""Load an external XML document.
:param url:
Expand Down
4 changes: 3 additions & 1 deletion src/zeep/wsdl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
"""
from zeep.wsdl.wsdl import Document as Document # noqa
from zeep.wsdl.wsdl import Document

__all__ = ["Document"]
6 changes: 4 additions & 2 deletions src/zeep/wsdl/bindings/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .http import HttpGetBinding as HttpGetBinding, HttpPostBinding as HttpPostBinding # noqa
from .soap import Soap11Binding as Soap11Binding, Soap12Binding as Soap12Binding # noqa
from .http import HttpGetBinding, HttpPostBinding
from .soap import Soap11Binding, Soap12Binding

__all__ = ["HttpGetBinding", "HttpPostBinding", "Soap11Binding", "Soap12Binding"]
14 changes: 11 additions & 3 deletions src/zeep/wsse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
from .compose import Compose as Compose # noqa
from .signature import BinarySignature as BinarySignature, MemorySignature as MemorySignature, Signature as Signature # noqa
from .username import UsernameToken as UsernameToken # noqa
from .compose import Compose
from .signature import BinarySignature, MemorySignature, Signature
from .username import UsernameToken

__all__ = [
"Compose",
"BinarySignature",
"MemorySignature",
"Signature",
"UsernameToken",
]
4 changes: 2 additions & 2 deletions src/zeep/xsd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
--------
"""
from zeep.xsd.const import Nil, SkipValue # noqa
from zeep.xsd.const import Nil, SkipValue
from zeep.xsd.elements import * # noqa
from zeep.xsd.schema import Schema as Schema # noqa
from zeep.xsd.schema import Schema as Schema
from zeep.xsd.types import * # noqa
from zeep.xsd.types.builtins import * # noqa
from zeep.xsd.valueobjects import * # noqa
4 changes: 3 additions & 1 deletion src/zeep/xsd/types/complex.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import copy
import logging
import sys
Expand Down Expand Up @@ -41,7 +43,7 @@

__all__ = ["ComplexType"]
# Recursive alias
_ObjectList = typing.List[typing.Union[CompoundValue, None, _ObjectList]]
_ObjectList = typing.List[typing.Union[CompoundValue, None, "_ObjectList"]]


class ComplexType(AnyType):
Expand Down
2 changes: 1 addition & 1 deletion src/zeep/xsd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create_name(self, name):

def max_occurs_iter(max_occurs, items=None):
assert max_occurs is not None
generator = range(0, max_occurs if max_occurs != "unbounded" else 2 ** 31 - 1)
generator = range(0, max_occurs if max_occurs != "unbounded" else 2**31 - 1)

if items is not None:
for i, sub_kwargs in zip(generator, items):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from tests.utils import load_xml
from zeep import client, xsd
from zeep.wsdl import Document
from zeep.transports import Transport
from zeep.exceptions import Error
from zeep.transports import Transport
from zeep.wsdl import Document


def test_bind():
Expand Down
4 changes: 1 addition & 3 deletions tests/test_wsse_signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@

skip_if_no_xmlsec = pytest.mark.skipif(
sys.platform == "win32", reason="does not run on windows"
) and pytest.mark.skipif(
xmlsec is None, reason="xmlsec library not installed"
)
) and pytest.mark.skipif(xmlsec is None, reason="xmlsec library not installed")


@skip_if_no_xmlsec
Expand Down

0 comments on commit a31583a

Please sign in to comment.