Commit d285f336 authored by Christian Bergmiller's avatar Christian Bergmiller Committed by oroulet

removed __all__ definitions

parent 30b2c19f
......@@ -2,8 +2,6 @@
Pure Python OPC-UA library
"""
from .common import *
from .client import *
from .server import *
__all__ = (client.__all__ + server.__all__)
from .common import Node, uamethod
from .client import Client
from .server import Server
from .client import *
from .client import Client
......@@ -5,11 +5,16 @@ from urllib.parse import urlparse
from asyncua import ua
from .ua_client import UaClient
from ..common import XmlImporter, XmlExporter, Node, delete_nodes, Subscription, Shortcuts, load_type_definitions, \
create_nonce, load_enums
from ..common.xmlimporter import XmlImporter
from ..common.xmlexporter import XmlExporter
from ..common.node import Node
from ..common.manage_nodes import delete_nodes
from ..common.subscription import Subscription
from ..common.shortcuts import Shortcuts
from ..common.structures import load_type_definitions, load_enums
from ..common.utils import create_nonce
from ..crypto import uacrypto, security_policies
__all__ = ["Client"]
_logger = logging.getLogger(__name__)
......
......@@ -6,10 +6,8 @@ import logging
from asyncua import ua
from ..ua.ua_binary import struct_from_binary, uatcp_to_binary, struct_to_binary, nodeid_from_binary, header_from_binary
from ..ua.uaerrors import UaError, BadTimeout, BadNoSubscription, BadSessionClosed
from ..common import SecureConnection
__all__ = ["UaClient"]
from ..ua.uaerrors import BadTimeout, BadNoSubscription, BadSessionClosed
from ..common.connection import SecureConnection
class UASocketProtocol(asyncio.Protocol):
......
from .callback import *
from .connection import *
from .copy_node_util import *
from .event_objects import *
from .events import *
from .instantiate_util import *
from .node import *
from .manage_nodes import *
from .methods import *
from .shortcuts import *
from .structures import *
from .subscription import *
from .ua_utils import *
from .utils import *
from .xmlexporter import *
from .xmlimporter import *
from .xmlparser import *
from .node import Node
from .methods import uamethod
__all__ = (callback.__all__ + connection.__all__ + copy_node_util.__all__ + event_objects.__all__ + events.__all__ +
instantiate_util.__all__ + manage_nodes.__all__ + methods.__all__ + node.__all__ + shortcuts.__all__ +
structures.__all__ + subscription.__all__ + ua_utils.__all__ + utils.__all__ + xmlexporter.__all__ +
xmlimporter.__all__ + xmlparser.__all__)
......@@ -5,17 +5,15 @@ server side implementation of callback event
from collections import OrderedDict
from enum import Enum
__all__ = ["CallbackType", "ServerItemCallback", "CallbackDispatcher"]
class CallbackType(Enum):
'''
"""
The possible types of a Callback type.
:ivar Null:
:ivar MonitoredItem:
'''
"""
Null = 0
ItemSubscriptionCreated = 1
ItemSubscriptionModified = 2
......
......@@ -7,7 +7,6 @@ from asyncua import ua
logger = logging.getLogger('asyncua.uaprotocol')
__all__ = ["MessageChunk", "SecureConnection"]
class MessageChunk(ua.FrozenClass):
......
......@@ -5,7 +5,6 @@ from .node_factory import make_node
logger = logging.getLogger(__name__)
__all__ = ["copy_node"]
async def copy_node(parent, node, nodeid=None, recursive=True):
......
......@@ -5,8 +5,6 @@ Autogenerated code from xml spec
from asyncua import ua
from .events import Event
__all__ = ["BaseEvent", "AuditEvent", "AuditSecurityEvent", "AuditChannelEvent", "AuditOpenSecureChannelEvent", "AuditSessionEvent", "AuditCreateSessionEvent", "AuditActivateSessionEvent", "AuditCancelEvent", "AuditCertificateEvent", "AuditCertificateDataMismatchEvent", "AuditCertificateExpiredEvent", "AuditCertificateInvalidEvent", "AuditCertificateUntrustedEvent", "AuditCertificateRevokedEvent", "AuditCertificateMismatchEvent", "AuditNodeManagementEvent", "AuditAddNodesEvent", "AuditDeleteNodesEvent", "AuditAddReferencesEvent", "AuditDeleteReferencesEvent", "AuditUpdateEvent", "AuditWriteUpdateEvent", "AuditHistoryUpdateEvent", "AuditUpdateMethodEvent", "SystemEvent", "DeviceFailureEvent", "BaseModelChangeEvent", "GeneralModelChangeEvent", "TransitionEvent", "AuditUpdateStateEvent", "ProgramTransitionEvent", "SemanticChangeEvent", "AuditUrlMismatchEvent", "RefreshStartEvent", "RefreshEndEvent", "RefreshRequiredEvent", "AuditConditionEvent", "AuditConditionEnableEvent", "AuditConditionCommentEvent", "AuditHistoryEventUpdateEvent", "AuditHistoryValueUpdateEvent", "AuditHistoryDeleteEvent", "AuditHistoryRawModifyDeleteEvent", "AuditHistoryAtTimeDeleteEvent", "AuditHistoryEventDeleteEvent", "EventQueueOverflowEvent", "ProgramTransitionAuditEvent", "AuditConditionRespondEvent", "AuditConditionAcknowledgeEvent", "AuditConditionConfirmEvent", "AuditConditionShelvingEvent", "ProgressEvent", "SystemStatusChangeEvent", "AuditProgramTransitionEvent", "TrustListUpdatedAuditEvent", "CertificateUpdatedAuditEvent", "AuditConditionResetEvent", "PubSubStatusEvent", "PubSubTransportLimitsExceedEvent", "PubSubCommunicationFailureEvent", "AuditConditionSuppressEvent", "AuditConditionSilenceEvent", "AuditConditionOutOfServiceEvent", "RoleMappingRuleChangedAuditEvent", "KeyCredentialAuditEvent", "KeyCredentialUpdatedAuditEvent", "KeyCredentialDeletedAuditEvent"]
class BaseEvent(Event):
"""
......
......@@ -5,8 +5,6 @@ import asyncua
from ..ua.uaerrors import UaError
from .ua_utils import get_node_subtypes
__all__ = ["Event", "get_event_obj_from_type_node", "get_event_properties_from_type_node"]
class Event:
"""
......
......@@ -10,7 +10,6 @@ from .copy_node_util import _rdesc_from_node, _read_and_copy_attrs
from .node_factory import make_node
logger = logging.getLogger(__name__)
__all__ = ["instantiate"]
async def instantiate(parent, node_type, nodeid=None, bname=None, dname=None, idx=0, instantiate_optional=True):
......
......@@ -7,10 +7,6 @@ from .instantiate_util import instantiate
from .node_factory import make_node
_logger = logging.getLogger(__name__)
__all__ = [
'create_folder', 'create_object', 'create_property', 'create_variable', 'create_variable_type',
'create_reference_type', 'create_object_type', 'create_method', 'create_data_type', 'delete_nodes'
]
def _parse_nodeid_qname(*args):
......
......@@ -4,8 +4,6 @@ High level method related functions
from asyncua import ua
__all__ = ["call_method", "call_method_full", "uamethod"]
async def call_method(parent, methodid, *args):
"""
......
......@@ -5,7 +5,7 @@ and browse address space
from datetime import datetime
import logging
from typing import Coroutine
from asyncua import ua
from .events import Event, get_filter_from_event_type
from .ua_utils import data_type_to_variant_type
......@@ -14,7 +14,6 @@ from .manage_nodes import create_folder, create_object, create_object_type, crea
from .methods import call_method
_logger = logging.getLogger(__name__)
__all__ = ["Node"]
def _check_results(results, reqlen=1):
......
from ..ua import ObjectIds
from .node import Node
__all__ = ["Shortcuts"]
class Shortcuts(object):
"""
......
......@@ -14,7 +14,6 @@ from lxml import objectify
from asyncua import ua
__all__ = ["load_type_definitions", "load_enums"]
_logger = logging.getLogger(__name__)
......
......@@ -4,14 +4,11 @@ high level interface to subscriptions
import asyncio
import logging
import collections
import time
from asyncua import ua
from .events import Event, get_filter_from_event_type
from .node import Node
__all__ = ["Subscription"]
class SubHandler:
"""
......
......@@ -11,11 +11,6 @@ import logging
from asyncua import ua
logger = logging.getLogger('__name__')
__all__ = [
"val_to_string", "string_to_val", "string_to_variant", "get_node_children", "get_node_subtypes",
"get_node_supertype", "get_node_supertypes", "get_nodes_of_namespace", "get_base_data_type", "is_child_present",
"data_type_to_variant_type"
]
def val_to_string(val, truncate=False):
......
......@@ -8,7 +8,6 @@ import logging
from ..ua.uaerrors import UaError
_logger = logging.getLogger(__name__)
__all__ = ["ServiceError", "NotEnoughData", "SocketClosedException", "Buffer", "create_nonce"]
class ServiceError(UaError):
......
......@@ -2,7 +2,6 @@
from a list of nodes in the address space, build an XML file
format is the one from opc-ua specification
"""
import asyncio
import logging
import functools
from collections import OrderedDict
......@@ -15,8 +14,6 @@ from ..ua import object_ids as o_ids
from .ua_utils import get_base_data_type
from asyncua.ua.uaerrors import UaError
__all__ = ["XmlExporter"]
class XmlExporter:
"""
......
......@@ -12,9 +12,6 @@ from .xmlparser import XMLParser, ua_type_to_python
from ..ua.uaerrors import UaError
__all__ = ["XmlImporter"]
class XmlImporter:
def __init__(self, server):
......
......@@ -13,8 +13,6 @@ import xml.etree.ElementTree as ET
from .ua_utils import string_to_val
from asyncua import ua
__all__ = ["XMLParser"]
def ua_type_to_python(val, uatype_as_str):
"""
......
......@@ -2,7 +2,6 @@ import os
import aiofiles
from cryptography import x509
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
......
from .binary_server_asyncio import *
from .history import *
from .history_sql import *
from .internal_server import *
from .internal_subscription import *
from .server import *
from .subscription_service import *
from .uaprocessor import *
from .users import *
from .event_generator import *
__all__ = (binary_server_asyncio.__all__ + history.__all__ + history_sql.__all__ + internal_server.__all__ +
internal_subscription.__all__ + server.__all__ + subscription_service.__all__ + uaprocessor.__all__ +
users.__all__ + event_generator.__all__)
from .server import Server
from .event_generator import EventGenerator
......@@ -8,10 +8,6 @@ from asyncua import ua
from .users import User
_logger = logging.getLogger(__name__)
__all__ = [
"AttributeValue", "NodeData", "AttributeService", "ViewService", "NodeManagementService", "MethodService",
"AddressSpace"
]
class AttributeValue(object):
......
......@@ -5,11 +5,10 @@ import logging
import asyncio
from ..ua.ua_binary import header_from_binary
from ..common import Buffer, NotEnoughData
from ..common.utils import Buffer, NotEnoughData
from .uaprocessor import UaProcessor
logger = logging.getLogger(__name__)
__all__ = ["BinaryServer"]
class OPCUAProtocol(asyncio.Protocol):
......
......@@ -4,9 +4,7 @@ import uuid
from asyncua import ua
from asyncua import Node
from asyncua.common import events, event_objects
__all__ = ["EventGenerator"]
from ..common import events, event_objects
class EventGenerator:
......
import asyncio
import logging
from typing import Coroutine
from datetime import timedelta
from datetime import datetime
from asyncua import ua
from ..common import Subscription, Buffer
__all__ = ["HistoryManager", "HistoryStorageInterface", "HistoryDict"]
from ..common.subscription import Subscription
from ..common.utils import Buffer
class UaNodeAlreadyHistorizedError(ua.UaError):
......
import logging
from typing import Iterable, Coroutine, Optional
from typing import Iterable, Optional
from datetime import timedelta
from datetime import datetime
from asyncio import get_event_loop
......@@ -7,11 +7,10 @@ import sqlite3
from asyncua import ua
from ..ua.ua_binary import variant_from_binary, variant_to_binary
from ..common import Buffer, Event, get_event_properties_from_type_node
from ..common.utils import Buffer
from ..common.events import Event, get_event_properties_from_type_node
from .history import HistoryStorageInterface
__all__ = ["HistorySQLite"]
class HistorySQLite(HistoryStorageInterface):
"""
......
......@@ -7,21 +7,21 @@ from datetime import datetime, timedelta
from copy import copy
from struct import unpack_from
import os
import asyncio
import logging
from enum import Enum
from urllib.parse import urlparse
from typing import Coroutine
from asyncua import ua
from ..common import CallbackType, ServerItemCallback, CallbackDispatcher, Node, create_nonce, ServiceError
from ..common.callback import CallbackType, ServerItemCallback, CallbackDispatcher
from ..common.node import Node
from ..common.utils import create_nonce, ServiceError
from .history import HistoryManager
from .address_space import AddressSpace, AttributeService, ViewService, NodeManagementService, MethodService
from .subscription_service import SubscriptionService
from .standard_address_space import standard_address_space
from .users import User
__all__ = ["InternalServer"]
use_crypto = True
try:
......
......@@ -8,8 +8,6 @@ import inspect
from asyncua import ua
__all__ = ["InternalSubscription", "WhereClauseEvaluator"]
class MonitoredItemData:
def __init__(self):
......
......@@ -14,13 +14,19 @@ from .binary_server_asyncio import BinaryServer
from .internal_server import InternalServer
from .event_generator import EventGenerator
from ..client import Client
from ..common import Node, Subscription, delete_nodes, BaseEvent, Shortcuts, load_type_definitions, XmlExporter,\
XmlImporter, get_nodes_of_namespace, load_enums
from ..common.node import Node
from ..common.subscription import Subscription
from ..common.xmlimporter import XmlImporter
from ..common.xmlexporter import XmlExporter
from ..common.manage_nodes import delete_nodes
from ..common.event_objects import BaseEvent
from ..common.shortcuts import Shortcuts
from ..common.structures import load_type_definitions, load_enums
from ..common.ua_utils import get_nodes_of_namespace
from ..crypto import security_policies, uacrypto
_logger = logging.getLogger(__name__)
__all__ = ["Server"]
class Server:
......
from .standard_address_space import *
__all__ = standard_address_space.__all__
from .standard_address_space import fill_address_space
......@@ -8,8 +8,6 @@ from .standard_address_space_part10 import create_standard_address_space_Part10
from .standard_address_space_part11 import create_standard_address_space_Part11
from .standard_address_space_part13 import create_standard_address_space_Part13
__all__ = ["fill_address_space"]
class PostponeReferences:
def __init__(self, server):
......
......@@ -8,8 +8,6 @@ import logging
from asyncua import ua
from .internal_subscription import InternalSubscription
__all__ = ["SubscriptionService"]
class SubscriptionService:
"""
......
......@@ -6,9 +6,9 @@ from collections import deque
from asyncua import ua
from ..ua.ua_binary import nodeid_from_binary, struct_from_binary, struct_to_binary, uatcp_to_binary
from .internal_server import InternalServer, InternalSession
from ..common import SecureConnection, ServiceError
from ..common.connection import SecureConnection
from ..common.utils import ServiceError
__all__ = ["UaProcessor"]
_logger = logging.getLogger(__name__)
......
......@@ -3,7 +3,6 @@ Implement user managent here
"""
from enum import Enum
__all__ = ["User"]
class User(Enum):
......
......@@ -16,9 +16,7 @@ except ImportError:
from asyncua import ua
from asyncua import Client
from asyncua import Server
from asyncua import Node
from asyncua import uamethod
from asyncua import Node, uamethod
from asyncua import sync
from asyncua.ua.uaerrors import UaStatusCodeError
......
import time
import asyncio
import logging
......
......@@ -3,8 +3,7 @@ import asyncio
sys.path.insert(0, "..")
import logging
from asyncua import Client
from asyncua import ua
from asyncua import Client, ua
class SubHandler(object):
......
import asyncio
import logging
from asyncua import ua, Server, EventGenerator
from asyncua import ua
from asyncua.server import Server, EventGenerator
logging.basicConfig(level=logging.INFO)
_logger = logging.getLogger('asyncua')
......
......@@ -4,7 +4,8 @@ import time
from IPython import embed
from asyncua import ua, Server, instantiate
from asyncua import ua, Server
from asyncua.common.instantiate_util import instantiate
if __name__ == "__main__":
......
......@@ -3,7 +3,7 @@ import time
sys.path.insert(0, "..")
from asyncua import ua, Server
from asyncua import Server
if __name__ == "__main__":
......
import sys
sys.path.insert(0, "..")
import time
from collections import OrderedDict
from asyncua import ua, Server, instantiate
from asyncua import ua, Server
from asyncua.common.instantiate_util import instantiate
from asyncua.common.xmlexporter import XmlExporter
......
from asyncua import Client, ua
from asyncua.ua import ua_binary as uabin
from asyncua.common.methods import call_method
from asyncua import Client
class HelloClient:
......
......@@ -15,7 +15,6 @@ except ImportError:
shell.interact()
from asyncua import ua
from asyncua.sync import Client, start_thread_loop, stop_thread_loop
......
import asyncio
import pytest
from collections import namedtuple
from asyncua import ua, Client, Server, HistoryDict, HistorySQLite
from asyncua import ua, Client, Server
from asyncua.server.history import HistoryDict
from asyncua.server.history_sql import HistorySQLite
from .test_common import add_server_methods
from .util_enum_struct import add_server_custom_enum_struct
......
......@@ -11,8 +11,11 @@ from datetime import datetime
from datetime import timedelta
import math
from asyncua import ua, call_method_full, copy_node, uamethod, instantiate
from asyncua import ua, uamethod
from asyncua.common import ua_utils
from asyncua.common.methods import call_method_full
from asyncua.common.copy_node_util import copy_node
from asyncua.common.instantiate_util import instantiate
pytestmark = pytest.mark.asyncio
......
......@@ -5,13 +5,12 @@ Tests that can only be run on server side must be defined here
import asyncio
import pytest
import logging
import os
import shelve
from datetime import timedelta
from enum import Enum, EnumMeta
import asyncua
from asyncua import Server, Client, ua, uamethod, BaseEvent, AuditEvent, AuditChannelEvent, AuditSecurityEvent, AuditOpenSecureChannelEvent
from asyncua import Server, Client, ua, uamethod
from asyncua.common.event_objects import BaseEvent, AuditEvent, AuditChannelEvent, AuditSecurityEvent, AuditOpenSecureChannelEvent
from asyncua.common import ua_utils
pytestmark = pytest.mark.asyncio
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment