Compare commits
16 Commits
85eee2c36a
...
8c012e5902
Author | SHA1 | Date | |
---|---|---|---|
8c012e5902 | |||
5e6d17cc86 | |||
c4a71de83f | |||
01bc746092 | |||
43710717c9 | |||
7bf5e25c5e | |||
faa030df96 | |||
8179508248 | |||
2c3664c1b9 | |||
269f083662 | |||
8b40c65661 | |||
7be3cf38dc | |||
b18a7297a7 | |||
7f46fbe87a | |||
e0ca7c2ae6 | |||
6389a940bc |
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli"
|
__title__ = 'cpl_cli'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -39,7 +39,7 @@ class Schematic(GenerateSchematicABC):
|
|||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
return self.build_code_str(code, Name=self._class_name)
|
return self.build_code_str(code, Name=self._class_name, NameLower=self._class_name.lower())
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
|
@ -11,11 +11,11 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli"
|
__title__ = 'cpl_cli'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,5 +27,5 @@ from .error import Error
|
|||||||
from .main import main
|
from .main import main
|
||||||
from .startup import Startup
|
from .startup import Startup
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli._templates"
|
__title__ = 'cpl_cli._templates'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli._templates.build"
|
__title__ = 'cpl_cli._templates.build'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli._templates.publish"
|
__title__ = 'cpl_cli._templates.publish'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.abc"
|
__title__ = 'cpl_cli.abc'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.command"
|
__title__ = 'cpl_cli.command'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,5 +28,5 @@ from .new_service import NewService
|
|||||||
from .publish_service import PublishService
|
from .publish_service import PublishService
|
||||||
from .version_service import VersionService
|
from .version_service import VersionService
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.configuration"
|
__title__ = 'cpl_cli.configuration'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -30,5 +30,5 @@ from .version_settings_name_enum import VersionSettingsNameEnum
|
|||||||
from .workspace_settings import WorkspaceSettings
|
from .workspace_settings import WorkspaceSettings
|
||||||
from .workspace_settings_name_enum import WorkspaceSettingsNameEnum
|
from .workspace_settings_name_enum import WorkspaceSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"Name": "cpl-cli",
|
"Name": "cpl-cli",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2023",
|
"Major": "2023",
|
||||||
"Minor": "2",
|
"Minor": "4",
|
||||||
"Micro": "0"
|
"Micro": "0"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
@ -16,7 +16,7 @@
|
|||||||
"LicenseName": "MIT",
|
"LicenseName": "MIT",
|
||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"cpl-core>=2023.2.0"
|
"cpl-core>=2023.4.0"
|
||||||
],
|
],
|
||||||
"DevDependencies": [],
|
"DevDependencies": [],
|
||||||
"PythonVersion": ">=3.10",
|
"PythonVersion": ">=3.10",
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.helper"
|
__title__ = 'cpl_cli.helper'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.live_server"
|
__title__ = 'cpl_cli.live_server'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.migrations"
|
__title__ = 'cpl_cli.migrations'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.migrations.base"
|
__title__ = 'cpl_cli.migrations.base'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.migrations.service"
|
__title__ = 'cpl_cli.migrations.service'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.publish"
|
__title__ = 'cpl_cli.publish'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .publisher_abc import PublisherABC
|
from .publisher_abc import PublisherABC
|
||||||
from .publisher_service import PublisherService
|
from .publisher_service import PublisherService
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.source_creator"
|
__title__ = 'cpl_cli.source_creator'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Command Line Interface
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_cli.validators"
|
__title__ = 'cpl_cli.validators'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core"
|
__title__ = 'cpl_core'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.application"
|
__title__ = 'cpl_core.application'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,5 +28,5 @@ from .application_extension_abc import ApplicationExtensionABC
|
|||||||
from .startup_abc import StartupABC
|
from .startup_abc import StartupABC
|
||||||
from .startup_extension_abc import StartupExtensionABC
|
from .startup_extension_abc import StartupExtensionABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.configuration"
|
__title__ = 'cpl_core.configuration'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -34,5 +34,5 @@ from .flag_argument import FlagArgument
|
|||||||
from .validator_abc import ValidatorABC
|
from .validator_abc import ValidatorABC
|
||||||
from .variable_argument import VariableArgument
|
from .variable_argument import VariableArgument
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.console"
|
__title__ = 'cpl_core.console'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,5 +27,5 @@ from .console_call import ConsoleCall
|
|||||||
from .foreground_color_enum import ForegroundColorEnum
|
from .foreground_color_enum import ForegroundColorEnum
|
||||||
from .spinner_thread import SpinnerThread
|
from .spinner_thread import SpinnerThread
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"Name": "cpl-core",
|
"Name": "cpl-core",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2023",
|
"Major": "2023",
|
||||||
"Minor": "2",
|
"Minor": "4",
|
||||||
"Micro": "0"
|
"Micro": "0"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
@ -16,17 +16,17 @@
|
|||||||
"LicenseName": "MIT",
|
"LicenseName": "MIT",
|
||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"art==5.8",
|
"art==5.9",
|
||||||
"colorama==0.4.6",
|
"colorama==0.4.6",
|
||||||
"mysql-connector==2.2.9",
|
"mysql-connector==2.2.9",
|
||||||
"psutil==5.9.4",
|
"psutil==5.9.4",
|
||||||
"packaging==22.0",
|
"packaging==23.0",
|
||||||
"pynput==1.7.6",
|
"pynput==1.7.6",
|
||||||
"setuptools==65.6.3",
|
"setuptools==67.6.1",
|
||||||
"tabulate==0.9.0",
|
"tabulate==0.9.0",
|
||||||
"termcolor==2.1.1",
|
"termcolor==2.2.0",
|
||||||
"watchdog==2.2.0",
|
"watchdog==3.0.0",
|
||||||
"wheel==0.38.4"
|
"wheel==0.40.0"
|
||||||
],
|
],
|
||||||
"DevDependencies": [
|
"DevDependencies": [
|
||||||
"Sphinx==5.0.2",
|
"Sphinx==5.0.2",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"sphinx-markdown-builder==0.5.5",
|
"sphinx-markdown-builder==0.5.5",
|
||||||
"pygount==1.5.1"
|
"pygount==1.5.1"
|
||||||
],
|
],
|
||||||
"PythonVersion": ">=3.10",
|
"PythonVersion": ">=3.11",
|
||||||
"PythonPath": {},
|
"PythonPath": {},
|
||||||
"Classifiers": []
|
"Classifiers": []
|
||||||
},
|
},
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.database"
|
__title__ = 'cpl_core.database'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,5 +25,5 @@ from .database_settings_name_enum import DatabaseSettingsNameEnum
|
|||||||
from .database_settings import DatabaseSettings
|
from .database_settings import DatabaseSettings
|
||||||
from .table_abc import TableABC
|
from .table_abc import TableABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.database.connection"
|
__title__ = 'cpl_core.database.connection'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .database_connection import DatabaseConnection
|
from .database_connection import DatabaseConnection
|
||||||
from .database_connection_abc import DatabaseConnectionABC
|
from .database_connection_abc import DatabaseConnectionABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.database.context"
|
__title__ = 'cpl_core.database.context'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .database_context import DatabaseContext
|
from .database_context import DatabaseContext
|
||||||
from .database_context_abc import DatabaseContextABC
|
from .database_context_abc import DatabaseContextABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.dependency_injection"
|
__title__ = 'cpl_core.dependency_injection'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -30,5 +30,5 @@ from .service_lifetime_enum import ServiceLifetimeEnum
|
|||||||
from .service_provider import ServiceProvider
|
from .service_provider import ServiceProvider
|
||||||
from .service_provider_abc import ServiceProviderABC
|
from .service_provider_abc import ServiceProviderABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -18,7 +18,8 @@ from cpl_core.type import T
|
|||||||
class ServiceProvider(ServiceProviderABC):
|
class ServiceProvider(ServiceProviderABC):
|
||||||
r"""Provider for the services
|
r"""Provider for the services
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
service_descriptors: list[:class:`cpl_core.dependency_injection.service_descriptor.ServiceDescriptor`]
|
service_descriptors: list[:class:`cpl_core.dependency_injection.service_descriptor.ServiceDescriptor`]
|
||||||
Descriptor of the service
|
Descriptor of the service
|
||||||
config: :class:`cpl_core.configuration.configuration_abc.ConfigurationABC`
|
config: :class:`cpl_core.configuration.configuration_abc.ConfigurationABC`
|
||||||
@ -63,7 +64,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
|
|
||||||
# raise Exception(f'Service {parameter.annotation} not found')
|
# raise Exception(f'Service {parameter.annotation} not found')
|
||||||
|
|
||||||
def _get_services(self, t: type) -> list[Optional[object]]:
|
def _get_services(self, t: type, *args, **kwargs) -> list[Optional[object]]:
|
||||||
implementations = []
|
implementations = []
|
||||||
for descriptor in self._service_descriptors:
|
for descriptor in self._service_descriptors:
|
||||||
if descriptor.service_type == t or issubclass(descriptor.service_type, t):
|
if descriptor.service_type == t or issubclass(descriptor.service_type, t):
|
||||||
@ -71,7 +72,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
implementations.append(descriptor.implementation)
|
implementations.append(descriptor.implementation)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
implementation = self.build_service(descriptor.service_type)
|
implementation = self.build_service(descriptor.service_type, *args, **kwargs)
|
||||||
if descriptor.lifetime == ServiceLifetimeEnum.singleton:
|
if descriptor.lifetime == ServiceLifetimeEnum.singleton:
|
||||||
descriptor.implementation = implementation
|
descriptor.implementation = implementation
|
||||||
|
|
||||||
@ -107,7 +108,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
|
|
||||||
return params
|
return params
|
||||||
|
|
||||||
def build_service(self, service_type: type) -> object:
|
def build_service(self, service_type: type, *args, **kwargs) -> object:
|
||||||
for descriptor in self._service_descriptors:
|
for descriptor in self._service_descriptors:
|
||||||
if descriptor.service_type == service_type or issubclass(descriptor.service_type, service_type):
|
if descriptor.service_type == service_type or issubclass(descriptor.service_type, service_type):
|
||||||
if descriptor.implementation is not None:
|
if descriptor.implementation is not None:
|
||||||
@ -120,7 +121,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
sig = signature(service_type.__init__)
|
sig = signature(service_type.__init__)
|
||||||
params = self.build_by_signature(sig)
|
params = self.build_by_signature(sig)
|
||||||
|
|
||||||
return service_type(*params)
|
return service_type(*params, *args, **kwargs)
|
||||||
|
|
||||||
def set_scope(self, scope: ScopeABC):
|
def set_scope(self, scope: ScopeABC):
|
||||||
self._scope = scope
|
self._scope = scope
|
||||||
@ -131,7 +132,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
)
|
)
|
||||||
return sb.build()
|
return sb.build()
|
||||||
|
|
||||||
def get_service(self, service_type: T) -> Optional[T]:
|
def get_service(self, service_type: T, *args, **kwargs) -> Optional[T]:
|
||||||
result = self._find_service(service_type)
|
result = self._find_service(service_type)
|
||||||
|
|
||||||
if result is None:
|
if result is None:
|
||||||
@ -140,7 +141,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
if result.implementation is not None:
|
if result.implementation is not None:
|
||||||
return result.implementation
|
return result.implementation
|
||||||
|
|
||||||
implementation = self.build_service(service_type)
|
implementation = self.build_service(service_type, *args, **kwargs)
|
||||||
if (
|
if (
|
||||||
result.lifetime == ServiceLifetimeEnum.singleton
|
result.lifetime == ServiceLifetimeEnum.singleton
|
||||||
or result.lifetime == ServiceLifetimeEnum.scoped
|
or result.lifetime == ServiceLifetimeEnum.scoped
|
||||||
@ -150,7 +151,7 @@ class ServiceProvider(ServiceProviderABC):
|
|||||||
|
|
||||||
return implementation
|
return implementation
|
||||||
|
|
||||||
def get_services(self, service_type: T) -> list[Optional[T]]:
|
def get_services(self, service_type: T, *args, **kwargs) -> list[Optional[T]]:
|
||||||
implementations = []
|
implementations = []
|
||||||
|
|
||||||
if typing.get_origin(service_type) != list:
|
if typing.get_origin(service_type) != list:
|
||||||
|
@ -25,14 +25,16 @@ class ServiceProviderABC(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def build_service(self, service_type: type) -> object:
|
def build_service(self, service_type: type, *args, **kwargs) -> object:
|
||||||
r"""Creates instance of given type
|
r"""Creates instance of given type
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
instance_type: :class:`type`
|
instance_type: :class:`type`
|
||||||
The type of the searched instance
|
The type of the searched instance
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Object of the given type
|
Object of the given type
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
@ -41,7 +43,8 @@ class ServiceProviderABC(ABC):
|
|||||||
def set_scope(self, scope: ScopeABC):
|
def set_scope(self, scope: ScopeABC):
|
||||||
r"""Sets the scope of service provider
|
r"""Sets the scope of service provider
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
Object of type :class:`cpl_core.dependency_injection.scope_abc.ScopeABC`
|
Object of type :class:`cpl_core.dependency_injection.scope_abc.ScopeABC`
|
||||||
Service scope
|
Service scope
|
||||||
"""
|
"""
|
||||||
@ -51,33 +54,38 @@ class ServiceProviderABC(ABC):
|
|||||||
def create_scope(self) -> ScopeABC:
|
def create_scope(self) -> ScopeABC:
|
||||||
r"""Creates a service scope
|
r"""Creates a service scope
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Object of type :class:`cpl_core.dependency_injection.scope_abc.ScopeABC`
|
Object of type :class:`cpl_core.dependency_injection.scope_abc.ScopeABC`
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_service(self, instance_type: Type[T]) -> Optional[T]:
|
def get_service(self, instance_type: T, *args, **kwargs) -> Optional[T]:
|
||||||
r"""Returns instance of given type
|
r"""Returns instance of given type
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
instance_type: :class:`cpl_core.type.T`
|
instance_type: :class:`cpl_core.type.T`
|
||||||
The type of the searched instance
|
The type of the searched instance
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Object of type Optional[:class:`cpl_core.type.T`]
|
Object of type Optional[:class:`cpl_core.type.T`]
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_services(self, service_type: T) -> list[Optional[T]]:
|
def get_services(self, service_type: T, *args, **kwargs) -> list[Optional[T]]:
|
||||||
r"""Returns instance of given type
|
r"""Returns instance of given type
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
instance_type: :class:`cpl_core.type.T`
|
instance_type: :class:`cpl_core.type.T`
|
||||||
The type of the searched instance
|
The type of the searched instance
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Object of type list[Optional[:class:`cpl_core.type.T`]
|
Object of type list[Optional[:class:`cpl_core.type.T`]
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
@ -86,10 +94,12 @@ class ServiceProviderABC(ABC):
|
|||||||
def inject(cls, f=None):
|
def inject(cls, f=None):
|
||||||
r"""Decorator to allow injection into static and class methods
|
r"""Decorator to allow injection into static and class methods
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
f: Callable
|
f: Callable
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
function
|
function
|
||||||
"""
|
"""
|
||||||
if f is None:
|
if f is None:
|
||||||
@ -100,7 +110,7 @@ class ServiceProviderABC(ABC):
|
|||||||
if cls._provider is None:
|
if cls._provider is None:
|
||||||
raise Exception(f"{cls.__name__} not build!")
|
raise Exception(f"{cls.__name__} not build!")
|
||||||
|
|
||||||
injection = cls._provider.build_by_signature(signature(f))
|
injection = [x for x in cls._provider.build_by_signature(signature(f)) if x is not None]
|
||||||
return f(*injection, *args, **kwargs)
|
return f(*args, *injection, **kwargs)
|
||||||
|
|
||||||
return inner
|
return inner
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.environment"
|
__title__ = 'cpl_core.environment'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,5 +25,5 @@ from .application_environment_abc import ApplicationEnvironmentABC
|
|||||||
from .environment_name_enum import EnvironmentNameEnum
|
from .environment_name_enum import EnvironmentNameEnum
|
||||||
from .application_environment import ApplicationEnvironment
|
from .application_environment import ApplicationEnvironment
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.logging"
|
__title__ = 'cpl_core.logging'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,5 +27,5 @@ from .logging_level_enum import LoggingLevelEnum
|
|||||||
from .logging_settings import LoggingSettings
|
from .logging_settings import LoggingSettings
|
||||||
from .logging_settings_name_enum import LoggingSettingsNameEnum
|
from .logging_settings_name_enum import LoggingSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.mailing"
|
__title__ = 'cpl_core.mailing'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -27,5 +27,5 @@ from .email_client_abc import EMailClientABC
|
|||||||
from .email_client_settings import EMailClientSettings
|
from .email_client_settings import EMailClientSettings
|
||||||
from .email_client_settings_name_enum import EMailClientSettingsNameEnum
|
from .email_client_settings_name_enum import EMailClientSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.pipes"
|
__title__ = 'cpl_core.pipes'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -29,5 +29,5 @@ from .pipe_abc import PipeABC
|
|||||||
from .to_camel_case_pipe import ToCamelCasePipe
|
from .to_camel_case_pipe import ToCamelCasePipe
|
||||||
from .to_snake_case_pipe import ToSnakeCasePipe
|
from .to_snake_case_pipe import ToSnakeCasePipe
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.time"
|
__title__ = 'cpl_core.time'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .time_format_settings import TimeFormatSettings
|
from .time_format_settings import TimeFormatSettings
|
||||||
from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum
|
from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL core package
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_core.utils"
|
__title__ = 'cpl_core.utils'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2020 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,5 +25,5 @@ from .credential_manager import CredentialManager
|
|||||||
from .string import String
|
from .string import String
|
||||||
from .pip import Pip
|
from .pip import Pip
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord"
|
__title__ = 'cpl_discord'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,15 +11,17 @@ class Event(GenerateSchematicABC):
|
|||||||
GenerateSchematicABC.__init__(self, name, schematic, path)
|
GenerateSchematicABC.__init__(self, name, schematic, path)
|
||||||
|
|
||||||
event = None
|
event = None
|
||||||
|
event_class = None
|
||||||
|
|
||||||
from cpl_discord.discord_event_types_enum import DiscordEventTypesEnum
|
from cpl_discord.discord_event_types_enum import DiscordEventTypesEnum
|
||||||
|
|
||||||
for event_type in DiscordEventTypesEnum:
|
for event_type in DiscordEventTypesEnum:
|
||||||
event_name = event_type.value.__name__.replace("ABC", "")
|
event_name = event_type.value.__name__.replace("ABC", "")
|
||||||
|
|
||||||
if event_name in name:
|
if name.endswith(event_name):
|
||||||
name = name.replace(event_name, "")
|
name = name.replace(event_name, "")
|
||||||
event = event_name
|
event = event_name
|
||||||
|
event_class = event_type.value
|
||||||
break
|
break
|
||||||
|
|
||||||
if event is None:
|
if event is None:
|
||||||
@ -29,15 +31,28 @@ class Event(GenerateSchematicABC):
|
|||||||
Console.write_line(f'\t{event_type.value.__name__.replace("ABC", "")}')
|
Console.write_line(f'\t{event_type.value.__name__.replace("ABC", "")}')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
self._event_class = f"{event}ABC"
|
self._event_class_name = f"{event}ABC"
|
||||||
self._name = f'{String.convert_to_snake_case(self._event_class.replace("ABC", ""))}_{schematic}.py'
|
event_snake_case = String.convert_to_snake_case(self._event_class_name.replace("ABC", ""))
|
||||||
self._class_name = f'{self._event_class.replace("ABC", "")}{String.first_to_upper(schematic)}'
|
|
||||||
|
if event_snake_case.lower() not in dir(event_class):
|
||||||
|
Console.error(f"Error in event {event}: Function {event_snake_case} not found!")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
self._name = f"{event_snake_case}_{schematic}.py"
|
||||||
|
self._class_name = f'{self._event_class_name.replace("ABC", "")}{String.first_to_upper(schematic)}'
|
||||||
|
|
||||||
|
from inspect import signature
|
||||||
|
|
||||||
|
self._func_name = event_snake_case
|
||||||
|
self._signature = str(signature(getattr(event_class, event_snake_case)))[1:][:-1]
|
||||||
|
|
||||||
if name != "":
|
if name != "":
|
||||||
self._name = f"{String.convert_to_snake_case(name)}_{self._name}"
|
self._name = f"{String.convert_to_snake_case(name)}_{self._name}"
|
||||||
self._class_name = f"{String.first_to_upper(name)}{self._class_name}"
|
self._class_name = f"{String.first_to_upper(name)}{self._class_name}"
|
||||||
|
|
||||||
def get_code(self) -> str:
|
def get_code(self) -> str:
|
||||||
code = """\
|
code = """\
|
||||||
|
import discord
|
||||||
from cpl_core.logging import LoggerABC
|
from cpl_core.logging import LoggerABC
|
||||||
from cpl_discord.events import $EventClass
|
from cpl_discord.events import $EventClass
|
||||||
from cpl_discord.service import DiscordBotServiceABC
|
from cpl_discord.service import DiscordBotServiceABC
|
||||||
@ -50,15 +65,21 @@ class Event(GenerateSchematicABC):
|
|||||||
logger: LoggerABC,
|
logger: LoggerABC,
|
||||||
bot: DiscordBotServiceABC,
|
bot: DiscordBotServiceABC,
|
||||||
):
|
):
|
||||||
OnReadyABC.__init__(self)
|
$EventClass.__init__(self)
|
||||||
|
|
||||||
self._logger = logger
|
self._logger = logger
|
||||||
self._bot = bot
|
self._bot = bot
|
||||||
|
|
||||||
async def on_ready(self):
|
async def $Func($Signature):
|
||||||
pass
|
pass
|
||||||
"""
|
"""
|
||||||
return self.build_code_str(code, Name=self._class_name, EventClass=self._event_class)
|
return self.build_code_str(
|
||||||
|
code,
|
||||||
|
Name=self._class_name,
|
||||||
|
EventClass=self._event_class_name,
|
||||||
|
Func=self._func_name,
|
||||||
|
Signature=self._signature,
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord"
|
__title__ = 'cpl_discord'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -58,5 +58,5 @@ def get_discord_collection(services: "ServiceCollectionABC") -> "DiscordCollecti
|
|||||||
|
|
||||||
# build-ignore-end
|
# build-ignore-end
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.application"
|
__title__ = 'cpl_discord.application'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,5 +23,5 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
from .discord_bot_application_abc import DiscordBotApplicationABC
|
from .discord_bot_application_abc import DiscordBotApplicationABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.command"
|
__title__ = 'cpl_discord.command'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .discord_command_abc import DiscordCommandABC
|
from .discord_command_abc import DiscordCommandABC
|
||||||
from .discord_commands_meta import DiscordCogMeta
|
from .discord_commands_meta import DiscordCogMeta
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.configuration"
|
__title__ = 'cpl_discord.configuration'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,5 +23,5 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
from .discord_bot_settings import DiscordBotSettings
|
from .discord_bot_settings import DiscordBotSettings
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.container"
|
__title__ = 'cpl_discord.container'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -30,5 +30,5 @@ from .text_channel import TextChannel
|
|||||||
from .thread import Thread
|
from .thread import Thread
|
||||||
from .voice_channel import VoiceChannel
|
from .voice_channel import VoiceChannel
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"Name": "cpl-discord",
|
"Name": "cpl-discord",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2023",
|
"Major": "2023",
|
||||||
"Minor": "2",
|
"Minor": "4",
|
||||||
"Micro": "0"
|
"Micro": "0"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
@ -16,12 +16,12 @@
|
|||||||
"LicenseName": "MIT",
|
"LicenseName": "MIT",
|
||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"cpl-core>=2023.2.0",
|
"cpl-core>=2023.4.0",
|
||||||
"discord.py==2.1.0",
|
"discord.py==2.1.0",
|
||||||
"cpl-query>=2023.2.0"
|
"cpl-query>=2023.4.0"
|
||||||
],
|
],
|
||||||
"DevDependencies": [
|
"DevDependencies": [
|
||||||
"cpl-cli>=2023.2.0"
|
"cpl-cli>=2023.4.0"
|
||||||
],
|
],
|
||||||
"PythonVersion": ">=3.10",
|
"PythonVersion": ">=3.10",
|
||||||
"PythonPath": {},
|
"PythonPath": {},
|
||||||
|
@ -47,6 +47,11 @@ from cpl_discord.events.on_reaction_clear_emoji_abc import OnReactionClearEmojiA
|
|||||||
from cpl_discord.events.on_reaction_remove_abc import OnReactionRemoveABC
|
from cpl_discord.events.on_reaction_remove_abc import OnReactionRemoveABC
|
||||||
from cpl_discord.events.on_ready_abc import OnReadyABC
|
from cpl_discord.events.on_ready_abc import OnReadyABC
|
||||||
from cpl_discord.events.on_resume_abc import OnResumeABC
|
from cpl_discord.events.on_resume_abc import OnResumeABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_create_abc import OnScheduledEventCreateABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_delete_abc import OnScheduledEventDeleteABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_update_abc import OnScheduledEventUpdateABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_user_add_abc import OnScheduledEventUserAddABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_user_remove_abc import OnScheduledEventUserRemoveABC
|
||||||
from cpl_discord.events.on_typing_abc import OnTypingABC
|
from cpl_discord.events.on_typing_abc import OnTypingABC
|
||||||
from cpl_discord.events.on_user_update_abc import OnUserUpdateABC
|
from cpl_discord.events.on_user_update_abc import OnUserUpdateABC
|
||||||
from cpl_discord.events.on_voice_state_update_abc import OnVoiceStateUpdateABC
|
from cpl_discord.events.on_voice_state_update_abc import OnVoiceStateUpdateABC
|
||||||
@ -76,6 +81,11 @@ class DiscordEventTypesEnum(Enum):
|
|||||||
on_guild_role_delete = OnGuildRoleDeleteABC
|
on_guild_role_delete = OnGuildRoleDeleteABC
|
||||||
on_guild_role_update = OnGuildRoleUpdateABC
|
on_guild_role_update = OnGuildRoleUpdateABC
|
||||||
on_guild_unavailable = OnGuildUnavailableABC
|
on_guild_unavailable = OnGuildUnavailableABC
|
||||||
|
on_scheduled_event_create = OnScheduledEventCreateABC
|
||||||
|
on_scheduled_event_delete = OnScheduledEventDeleteABC
|
||||||
|
on_scheduled_event_update = OnScheduledEventUpdateABC
|
||||||
|
on_scheduled_event_user_add = OnScheduledEventUserAddABC
|
||||||
|
on_scheduled_event_user_remove = OnScheduledEventUserRemoveABC
|
||||||
on_guild_update = OnGuildUpdateABC
|
on_guild_update = OnGuildUpdateABC
|
||||||
on_invite_create = OnInviteCreateABC
|
on_invite_create = OnInviteCreateABC
|
||||||
on_invite_delete = OnInviteDeleteABC
|
on_invite_delete = OnInviteDeleteABC
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.events"
|
__title__ = 'cpl_discord.events'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -68,5 +68,5 @@ from .on_user_update_abc import OnUserUpdateABC
|
|||||||
from .on_voice_state_update_abc import OnVoiceStateUpdateABC
|
from .on_voice_state_update_abc import OnVoiceStateUpdateABC
|
||||||
from .on_webhooks_update_abc import OnWebhooksUpdateABC
|
from .on_webhooks_update_abc import OnWebhooksUpdateABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
12
src/cpl_discord/events/on_scheduled_event_create_abc.py
Normal file
12
src/cpl_discord/events/on_scheduled_event_create_abc.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
import discord
|
||||||
|
|
||||||
|
|
||||||
|
class OnScheduledEventCreateABC(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def on_scheduled_event_create(self, event: discord.ScheduledEvent):
|
||||||
|
pass
|
12
src/cpl_discord/events/on_scheduled_event_delete_abc.py
Normal file
12
src/cpl_discord/events/on_scheduled_event_delete_abc.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
import discord
|
||||||
|
|
||||||
|
|
||||||
|
class OnScheduledEventDeleteABC(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def on_scheduled_event_delete(self, event: discord.ScheduledEvent):
|
||||||
|
pass
|
12
src/cpl_discord/events/on_scheduled_event_update_abc.py
Normal file
12
src/cpl_discord/events/on_scheduled_event_update_abc.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
import discord
|
||||||
|
|
||||||
|
|
||||||
|
class OnScheduledEventUpdateABC(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def on_scheduled_event_update(self, before: discord.ScheduledEvent, after: discord.ScheduledEvent):
|
||||||
|
pass
|
12
src/cpl_discord/events/on_scheduled_event_user_add_abc.py
Normal file
12
src/cpl_discord/events/on_scheduled_event_user_add_abc.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
import discord
|
||||||
|
|
||||||
|
|
||||||
|
class OnScheduledEventUserAddABC(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def on_scheduled_event_user_add(self, event: discord.ScheduledEvent, user: discord.User):
|
||||||
|
pass
|
12
src/cpl_discord/events/on_scheduled_event_user_remove_abc.py
Normal file
12
src/cpl_discord/events/on_scheduled_event_user_remove_abc.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
import discord
|
||||||
|
|
||||||
|
|
||||||
|
class OnScheduledEventUserRemoveABC(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def on_scheduled_event_user_remove(self, event: discord.ScheduledEvent, user: discord.User):
|
||||||
|
pass
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.helper"
|
__title__ = 'cpl_discord.helper'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,5 +23,5 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
from .to_containers_converter import ToContainersConverter
|
from .to_containers_converter import ToContainersConverter
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ Link between discord.py and CPL
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_discord.service"
|
__title__ = 'cpl_discord.service'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,5 +28,5 @@ from .discord_collection import DiscordCollection
|
|||||||
from .discord_service import DiscordService
|
from .discord_service import DiscordService
|
||||||
from .discord_service_abc import DiscordServiceABC
|
from .discord_service_abc import DiscordServiceABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -21,6 +21,8 @@ class DiscordBotService(DiscordBotServiceABC):
|
|||||||
env: ApplicationEnvironmentABC,
|
env: ApplicationEnvironmentABC,
|
||||||
logging_st: LoggingSettings,
|
logging_st: LoggingSettings,
|
||||||
discord_service: DiscordServiceABC,
|
discord_service: DiscordServiceABC,
|
||||||
|
*args,
|
||||||
|
**kwargs,
|
||||||
):
|
):
|
||||||
# services
|
# services
|
||||||
self._config = config
|
self._config = config
|
||||||
@ -34,7 +36,12 @@ class DiscordBotService(DiscordBotServiceABC):
|
|||||||
|
|
||||||
# setup super
|
# setup super
|
||||||
DiscordBotServiceABC.__init__(
|
DiscordBotServiceABC.__init__(
|
||||||
self, command_prefix=self._discord_settings.prefix, help_command=None, intents=discord.Intents().all()
|
self,
|
||||||
|
*args,
|
||||||
|
command_prefix=self._discord_settings.prefix,
|
||||||
|
help_command=None,
|
||||||
|
intents=discord.Intents().all(),
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
self._base = super(DiscordBotServiceABC, self)
|
self._base = super(DiscordBotServiceABC, self)
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ from cpl_query.extension.list import List
|
|||||||
|
|
||||||
|
|
||||||
class DiscordBotServiceABC(commands.Bot):
|
class DiscordBotServiceABC(commands.Bot):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
commands.Bot.__init__(self, **kwargs)
|
commands.Bot.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
async def start_async(self):
|
async def start_async(self):
|
||||||
|
@ -57,6 +57,11 @@ from cpl_discord.events.on_reaction_clear_emoji_abc import OnReactionClearEmojiA
|
|||||||
from cpl_discord.events.on_reaction_remove_abc import OnReactionRemoveABC
|
from cpl_discord.events.on_reaction_remove_abc import OnReactionRemoveABC
|
||||||
from cpl_discord.events.on_ready_abc import OnReadyABC
|
from cpl_discord.events.on_ready_abc import OnReadyABC
|
||||||
from cpl_discord.events.on_resume_abc import OnResumeABC
|
from cpl_discord.events.on_resume_abc import OnResumeABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_create_abc import OnScheduledEventCreateABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_delete_abc import OnScheduledEventDeleteABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_update_abc import OnScheduledEventUpdateABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_user_add_abc import OnScheduledEventUserAddABC
|
||||||
|
from cpl_discord.events.on_scheduled_event_user_remove_abc import OnScheduledEventUserRemoveABC
|
||||||
from cpl_discord.events.on_typing_abc import OnTypingABC
|
from cpl_discord.events.on_typing_abc import OnTypingABC
|
||||||
from cpl_discord.events.on_user_update_abc import OnUserUpdateABC
|
from cpl_discord.events.on_user_update_abc import OnUserUpdateABC
|
||||||
from cpl_discord.events.on_voice_state_update_abc import OnVoiceStateUpdateABC
|
from cpl_discord.events.on_voice_state_update_abc import OnVoiceStateUpdateABC
|
||||||
@ -337,6 +342,31 @@ class DiscordService(DiscordServiceABC, commands.Cog, metaclass=DiscordCogMeta):
|
|||||||
self._logger.trace(__name__, f"Received on_guild_unavailable:\n\t{guild}")
|
self._logger.trace(__name__, f"Received on_guild_unavailable:\n\t{guild}")
|
||||||
await self._handle_event(OnGuildUnavailableABC, guild)
|
await self._handle_event(OnGuildUnavailableABC, guild)
|
||||||
|
|
||||||
|
@commands.Cog.listener()
|
||||||
|
async def on_scheduled_event_create(self, event: discord.ScheduledEvent):
|
||||||
|
self._logger.trace(__name__, f"Received on_scheduled_event_create:\n\t{event}")
|
||||||
|
await self._handle_event(OnScheduledEventCreateABC, event)
|
||||||
|
|
||||||
|
@commands.Cog.listener()
|
||||||
|
async def on_scheduled_event_delete(self, event: discord.ScheduledEvent):
|
||||||
|
self._logger.trace(__name__, f"Received on_scheduled_event_delete:\n\t{event}")
|
||||||
|
await self._handle_event(OnScheduledEventDeleteABC, event)
|
||||||
|
|
||||||
|
@commands.Cog.listener()
|
||||||
|
async def on_scheduled_event_update(self, before: discord.ScheduledEvent, after: discord.ScheduledEvent):
|
||||||
|
self._logger.trace(__name__, f"Received on_scheduled_event_update:\n\t{before}, {after}")
|
||||||
|
await self._handle_event(OnScheduledEventUpdateABC, before, after)
|
||||||
|
|
||||||
|
@commands.Cog.listener()
|
||||||
|
async def on_scheduled_event_user_add(self, event: discord.ScheduledEvent, user: discord.User):
|
||||||
|
self._logger.trace(__name__, f"Received on_scheduled_event_user_add:\n\t{event}, {user}")
|
||||||
|
await self._handle_event(OnScheduledEventUserAddABC, event, user)
|
||||||
|
|
||||||
|
@commands.Cog.listener()
|
||||||
|
async def on_scheduled_event_user_remove(self, event: discord.ScheduledEvent, user: discord.User):
|
||||||
|
self._logger.trace(__name__, f"Received on_scheduled_event_user_remove:\n\t{event}, {user}")
|
||||||
|
await self._handle_event(OnScheduledEventUserRemoveABC, event, user)
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_voice_state_update(
|
async def on_voice_state_update(
|
||||||
self, member: discord.Member, before: discord.VoiceState, after: discord.VoiceState
|
self, member: discord.Member, before: discord.VoiceState, after: discord.VoiceState
|
||||||
|
@ -11,16 +11,16 @@ CPL Python integrated Queries
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_query"
|
__title__ = 'cpl_query'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2021 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL Python integrated Queries
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_query.base"
|
__title__ = 'cpl_query.base'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2021 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from typing import Iterable
|
from typing import Iterable, Self
|
||||||
|
|
||||||
from cpl_query.base.queryable_abc import QueryableABC
|
from cpl_query.base.queryable_abc import QueryableABC
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ class OrderedQueryableABC(QueryableABC):
|
|||||||
self._funcs.append(_func)
|
self._funcs.append(_func)
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def then_by(self, func: Callable) -> "OrderedQueryableABC":
|
def then_by(self, func: Callable) -> Self:
|
||||||
r"""Sorts OrderedList in ascending order by function
|
r"""Sorts OrderedList in ascending order by function
|
||||||
|
|
||||||
Parameter:
|
Parameter:
|
||||||
@ -26,7 +26,7 @@ class OrderedQueryableABC(QueryableABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def then_by_descending(self, func: Callable) -> "OrderedQueryableABC":
|
def then_by_descending(self, func: Callable) -> Self:
|
||||||
r"""Sorts OrderedList in descending order by function
|
r"""Sorts OrderedList in descending order by function
|
||||||
|
|
||||||
Parameter:
|
Parameter:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Optional, Callable, Union, Iterable
|
from typing import Optional, Callable, Union, Iterable, Self
|
||||||
|
|
||||||
from cpl_query._helper import is_number
|
from cpl_query._helper import is_number
|
||||||
from cpl_query.base.sequence import Sequence
|
from cpl_query.base.sequence import Sequence
|
||||||
@ -21,11 +21,13 @@ class QueryableABC(Sequence):
|
|||||||
def all(self, _func: Callable = None) -> bool:
|
def all(self, _func: Callable = None) -> bool:
|
||||||
r"""Checks if every element of list equals result found by function
|
r"""Checks if every element of list equals result found by function
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
bool
|
bool
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -36,11 +38,13 @@ class QueryableABC(Sequence):
|
|||||||
def any(self, _func: Callable = None) -> bool:
|
def any(self, _func: Callable = None) -> bool:
|
||||||
r"""Checks if list contains result found by function
|
r"""Checks if list contains result found by function
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
bool
|
bool
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -51,11 +55,13 @@ class QueryableABC(Sequence):
|
|||||||
def average(self, _func: Callable = None) -> Union[int, float, complex]:
|
def average(self, _func: Callable = None) -> Union[int, float, complex]:
|
||||||
r"""Returns average value of list
|
r"""Returns average value of list
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Union[int, float, complex]
|
Union[int, float, complex]
|
||||||
"""
|
"""
|
||||||
if _func is None and not is_number(self.type):
|
if _func is None and not is_number(self.type):
|
||||||
@ -66,11 +72,13 @@ class QueryableABC(Sequence):
|
|||||||
def contains(self, _value: object) -> bool:
|
def contains(self, _value: object) -> bool:
|
||||||
r"""Checks if list contains value given by function
|
r"""Checks if list contains value given by function
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
value: :class:`object`
|
value: :class:`object`
|
||||||
value
|
value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
bool
|
bool
|
||||||
"""
|
"""
|
||||||
if _value is None:
|
if _value is None:
|
||||||
@ -81,11 +89,13 @@ class QueryableABC(Sequence):
|
|||||||
def count(self, _func: Callable = None) -> int:
|
def count(self, _func: Callable = None) -> int:
|
||||||
r"""Returns length of list or count of found elements
|
r"""Returns length of list or count of found elements
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
int
|
int
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -93,14 +103,16 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return self.where(_func).count()
|
return self.where(_func).count()
|
||||||
|
|
||||||
def distinct(self, _func: Callable = None) -> "QueryableABC":
|
def distinct(self, _func: Callable = None) -> Self:
|
||||||
r"""Returns list without redundancies
|
r"""Returns list without redundancies
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -121,11 +133,13 @@ class QueryableABC(Sequence):
|
|||||||
def element_at(self, _index: int) -> any:
|
def element_at(self, _index: int) -> any:
|
||||||
r"""Returns element at given index
|
r"""Returns element at given index
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
_index: :class:`int`
|
_index: :class:`int`
|
||||||
index
|
index
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Value at _index: any
|
Value at _index: any
|
||||||
"""
|
"""
|
||||||
if _index is None:
|
if _index is None:
|
||||||
@ -143,11 +157,13 @@ class QueryableABC(Sequence):
|
|||||||
def element_at_or_default(self, _index: int) -> Optional[any]:
|
def element_at_or_default(self, _index: int) -> Optional[any]:
|
||||||
r"""Returns element at given index or None
|
r"""Returns element at given index or None
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
_index: :class:`int`
|
_index: :class:`int`
|
||||||
index
|
index
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Value at _index: Optional[any]
|
Value at _index: Optional[any]
|
||||||
"""
|
"""
|
||||||
if _index is None:
|
if _index is None:
|
||||||
@ -161,7 +177,8 @@ class QueryableABC(Sequence):
|
|||||||
def first(self) -> any:
|
def first(self) -> any:
|
||||||
r"""Returns first element
|
r"""Returns first element
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
First element of list: any
|
First element of list: any
|
||||||
"""
|
"""
|
||||||
if self.count() == 0:
|
if self.count() == 0:
|
||||||
@ -172,7 +189,8 @@ class QueryableABC(Sequence):
|
|||||||
def first_or_default(self) -> any:
|
def first_or_default(self) -> any:
|
||||||
r"""Returns first element or None
|
r"""Returns first element or None
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
First element of list: Optional[any]
|
First element of list: Optional[any]
|
||||||
"""
|
"""
|
||||||
if self.count() == 0:
|
if self.count() == 0:
|
||||||
@ -183,7 +201,8 @@ class QueryableABC(Sequence):
|
|||||||
def for_each(self, _func: Callable = None):
|
def for_each(self, _func: Callable = None):
|
||||||
r"""Runs given function for each element of list
|
r"""Runs given function for each element of list
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class: `Callable`
|
func: :class: `Callable`
|
||||||
function to call
|
function to call
|
||||||
"""
|
"""
|
||||||
@ -193,10 +212,11 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def group_by(self, _func: Callable = None) -> "QueryableABC":
|
def group_by(self, _func: Callable = None) -> Self:
|
||||||
r"""Groups by func
|
r"""Groups by func
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Grouped list[list[any]]: any
|
Grouped list[list[any]]: any
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -219,7 +239,8 @@ class QueryableABC(Sequence):
|
|||||||
def last(self) -> any:
|
def last(self) -> any:
|
||||||
r"""Returns last element
|
r"""Returns last element
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Last element of list: any
|
Last element of list: any
|
||||||
"""
|
"""
|
||||||
if self.count() == 0:
|
if self.count() == 0:
|
||||||
@ -230,7 +251,8 @@ class QueryableABC(Sequence):
|
|||||||
def last_or_default(self) -> any:
|
def last_or_default(self) -> any:
|
||||||
r"""Returns last element or None
|
r"""Returns last element or None
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Last element of list: Optional[any]
|
Last element of list: Optional[any]
|
||||||
"""
|
"""
|
||||||
if self.count() == 0:
|
if self.count() == 0:
|
||||||
@ -241,11 +263,13 @@ class QueryableABC(Sequence):
|
|||||||
def max(self, _func: Callable = None) -> object:
|
def max(self, _func: Callable = None) -> object:
|
||||||
r"""Returns the highest value
|
r"""Returns the highest value
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
object
|
object
|
||||||
"""
|
"""
|
||||||
if _func is None and not is_number(self.type):
|
if _func is None and not is_number(self.type):
|
||||||
@ -259,7 +283,8 @@ class QueryableABC(Sequence):
|
|||||||
def median(self, _func=None) -> Union[int, float]:
|
def median(self, _func=None) -> Union[int, float]:
|
||||||
r"""Return the median value of data elements
|
r"""Return the median value of data elements
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Union[int, float]
|
Union[int, float]
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -273,11 +298,13 @@ class QueryableABC(Sequence):
|
|||||||
def min(self, _func: Callable = None) -> object:
|
def min(self, _func: Callable = None) -> object:
|
||||||
r"""Returns the lowest value
|
r"""Returns the lowest value
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
object
|
object
|
||||||
"""
|
"""
|
||||||
if _func is None and not is_number(self.type):
|
if _func is None and not is_number(self.type):
|
||||||
@ -288,15 +315,17 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return _func(min(self, key=_func))
|
return _func(min(self, key=_func))
|
||||||
|
|
||||||
def order_by(self, _func: Callable = None) -> "QueryableABC":
|
def order_by(self, _func: Callable = None) -> "OrderedQueryableABC":
|
||||||
r"""Sorts elements by function in ascending order
|
r"""Sorts elements by function in ascending order
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
-------
|
||||||
|
:class: `cpl_query.base.ordered_queryable_abc.OrderedQueryableABC`
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
_func = _default_lambda
|
_func = _default_lambda
|
||||||
@ -305,15 +334,17 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return OrderedQueryable(self.type, sorted(self, key=_func), _func)
|
return OrderedQueryable(self.type, sorted(self, key=_func), _func)
|
||||||
|
|
||||||
def order_by_descending(self, _func: Callable = None) -> "QueryableABC":
|
def order_by_descending(self, _func: Callable = None) -> "OrderedQueryableABC":
|
||||||
r"""Sorts elements by function in descending order
|
r"""Sorts elements by function in descending order
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
-------
|
||||||
|
:class: `cpl_query.base.ordered_queryable_abc.OrderedQueryableABC`
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
_func = _default_lambda
|
_func = _default_lambda
|
||||||
@ -322,18 +353,20 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return OrderedQueryable(self.type, sorted(self, key=_func, reverse=True), _func)
|
return OrderedQueryable(self.type, sorted(self, key=_func, reverse=True), _func)
|
||||||
|
|
||||||
def reverse(self) -> "QueryableABC":
|
def reverse(self) -> Self:
|
||||||
r"""Reverses list
|
r"""Reverses list
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
return type(self)(self._type, reversed(self._values))
|
return type(self)(self._type, reversed(self._values))
|
||||||
|
|
||||||
def select(self, _func: Callable) -> "QueryableABC":
|
def select(self, _func: Callable) -> Self:
|
||||||
r"""Formats each element of list to a given format
|
r"""Formats each element of list to a given format
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
@ -341,10 +374,11 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return type(self)(object, [_func(_o) for _o in self])
|
return type(self)(object, [_func(_o) for _o in self])
|
||||||
|
|
||||||
def select_many(self, _func: Callable) -> "QueryableABC":
|
def select_many(self, _func: Callable) -> Self:
|
||||||
r"""Flattens resulting lists to one
|
r"""Flattens resulting lists to one
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
# The line below is pain. I don't understand anything of it...
|
# The line below is pain. I don't understand anything of it...
|
||||||
@ -354,10 +388,12 @@ class QueryableABC(Sequence):
|
|||||||
def single(self) -> any:
|
def single(self) -> any:
|
||||||
r"""Returns one single element of list
|
r"""Returns one single element of list
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Found value: any
|
Found value: any
|
||||||
|
|
||||||
Raises:
|
Raises
|
||||||
|
------
|
||||||
ArgumentNoneException: when argument is None
|
ArgumentNoneException: when argument is None
|
||||||
Exception: when argument is None or found more than one element
|
Exception: when argument is None or found more than one element
|
||||||
"""
|
"""
|
||||||
@ -371,7 +407,8 @@ class QueryableABC(Sequence):
|
|||||||
def single_or_default(self) -> Optional[any]:
|
def single_or_default(self) -> Optional[any]:
|
||||||
r"""Returns one single element of list
|
r"""Returns one single element of list
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Found value: Optional[any]
|
Found value: Optional[any]
|
||||||
"""
|
"""
|
||||||
if self.count() > 1:
|
if self.count() > 1:
|
||||||
@ -381,14 +418,16 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return self._values[0]
|
return self._values[0]
|
||||||
|
|
||||||
def skip(self, _index: int) -> "QueryableABC":
|
def skip(self, _index: int) -> Self:
|
||||||
r"""Skips all elements from index
|
r"""Skips all elements from index
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
_index: :class:`int`
|
_index: :class:`int`
|
||||||
index
|
index
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
if _index is None:
|
if _index is None:
|
||||||
@ -396,14 +435,16 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return type(self)(self.type, self._values[_index:])
|
return type(self)(self.type, self._values[_index:])
|
||||||
|
|
||||||
def skip_last(self, _index: int) -> "QueryableABC":
|
def skip_last(self, _index: int) -> Self:
|
||||||
r"""Skips all elements after index
|
r"""Skips all elements after index
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
_index: :class:`int`
|
_index: :class:`int`
|
||||||
index
|
index
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
if _index is None:
|
if _index is None:
|
||||||
@ -415,11 +456,13 @@ class QueryableABC(Sequence):
|
|||||||
def sum(self, _func: Callable = None) -> Union[int, float, complex]:
|
def sum(self, _func: Callable = None) -> Union[int, float, complex]:
|
||||||
r"""Sum of all values
|
r"""Sum of all values
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
Union[int, float, complex]
|
Union[int, float, complex]
|
||||||
"""
|
"""
|
||||||
if _func is None and not is_number(self.type):
|
if _func is None and not is_number(self.type):
|
||||||
@ -434,15 +477,17 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def split(self, _func: Callable) -> "QueryableABC":
|
def split(self, _func: Callable) -> Self:
|
||||||
r"""Splits the list by given function
|
r"""Splits the list by given function
|
||||||
|
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
seperator
|
seperator
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
groups = []
|
groups = []
|
||||||
@ -465,14 +510,16 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return type(self)(self._type, query_groups)
|
return type(self)(self._type, query_groups)
|
||||||
|
|
||||||
def take(self, _index: int) -> "QueryableABC":
|
def take(self, _index: int) -> Self:
|
||||||
r"""Takes all elements from index
|
r"""Takes all elements from index
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
_index: :class:`int`
|
_index: :class:`int`
|
||||||
index
|
index
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
if _index is None:
|
if _index is None:
|
||||||
@ -480,14 +527,16 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return type(self)(self._type, self._values[:_index])
|
return type(self)(self._type, self._values[:_index])
|
||||||
|
|
||||||
def take_last(self, _index: int) -> "QueryableABC":
|
def take_last(self, _index: int) -> Self:
|
||||||
r"""Takes all elements after index
|
r"""Takes all elements after index
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
_index: :class:`int`
|
_index: :class:`int`
|
||||||
index
|
index
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
index = self.count() - _index
|
index = self.count() - _index
|
||||||
@ -497,14 +546,16 @@ class QueryableABC(Sequence):
|
|||||||
|
|
||||||
return type(self)(self._type, self._values[index:])
|
return type(self)(self._type, self._values[index:])
|
||||||
|
|
||||||
def where(self, _func: Callable = None) -> "QueryableABC":
|
def where(self, _func: Callable = None) -> Self:
|
||||||
r"""Select element by function
|
r"""Select element by function
|
||||||
|
|
||||||
Parameter:
|
Parameter
|
||||||
|
---------
|
||||||
func: :class:`Callable`
|
func: :class:`Callable`
|
||||||
selected value
|
selected value
|
||||||
|
|
||||||
Returns:
|
Returns
|
||||||
|
-------
|
||||||
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
:class: `cpl_query.base.queryable_abc.QueryableABC`
|
||||||
"""
|
"""
|
||||||
if _func is None:
|
if _func is None:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"Name": "cpl-query",
|
"Name": "cpl-query",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2023",
|
"Major": "2023",
|
||||||
"Minor": "2",
|
"Minor": "4",
|
||||||
"Micro": "0"
|
"Micro": "0"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [],
|
"Dependencies": [],
|
||||||
"DevDependencies": [],
|
"DevDependencies": [],
|
||||||
"PythonVersion": ">=3.10",
|
"PythonVersion": ">=3.11",
|
||||||
"PythonPath": {},
|
"PythonPath": {},
|
||||||
"Classifiers": []
|
"Classifiers": []
|
||||||
},
|
},
|
||||||
|
@ -11,11 +11,11 @@ CPL Python integrated Queries
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_query.enumerable"
|
__title__ = 'cpl_query.enumerable'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2021 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .enumerable import Enumerable
|
from .enumerable import Enumerable
|
||||||
from .enumerable_abc import EnumerableABC
|
from .enumerable_abc import EnumerableABC
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL Python integrated Queries
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_query.extension"
|
__title__ = 'cpl_query.extension'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2021 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,5 +23,5 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
from .list import List
|
from .list import List
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL Python integrated Queries
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_query.iterable"
|
__title__ = 'cpl_query.iterable'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2021 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -24,5 +24,5 @@ from collections import namedtuple
|
|||||||
from .iterable_abc import IterableABC
|
from .iterable_abc import IterableABC
|
||||||
from .iterable import Iterable
|
from .iterable import Iterable
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -11,11 +11,11 @@ CPL translation extension
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "cpl_translation"
|
__title__ = 'cpl_translation'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 - 2023 sh-edraft.de'
|
||||||
__version__ = "2023.2.0"
|
__version__ = '2023.4.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,7 +25,6 @@ from .translate_pipe import TranslatePipe
|
|||||||
from .translation_service import TranslationService
|
from .translation_service import TranslationService
|
||||||
from .translation_service_abc import TranslationServiceABC
|
from .translation_service_abc import TranslationServiceABC
|
||||||
from .translation_settings import TranslationSettings
|
from .translation_settings import TranslationSettings
|
||||||
|
|
||||||
# build-ignore
|
# build-ignore
|
||||||
|
|
||||||
|
|
||||||
@ -52,5 +51,5 @@ def init():
|
|||||||
init()
|
init()
|
||||||
# build-ignore-end
|
# build-ignore-end
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2023", minor="2", micro="0")
|
version_info = VersionInfo(major='2023', minor='4', micro='0')
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"Name": "cpl-translation",
|
"Name": "cpl-translation",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2023",
|
"Major": "2023",
|
||||||
"Minor": "2",
|
"Minor": "4",
|
||||||
"Micro": "0"
|
"Micro": "0"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
@ -16,10 +16,10 @@
|
|||||||
"LicenseName": "MIT",
|
"LicenseName": "MIT",
|
||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"cpl-core>=2023.2.0"
|
"cpl-core>=2023.4.0"
|
||||||
],
|
],
|
||||||
"DevDependencies": [
|
"DevDependencies": [
|
||||||
"cpl-cli>=2023.2.0"
|
"cpl-cli>=2023.4.0"
|
||||||
],
|
],
|
||||||
"PythonVersion": ">=3.10",
|
"PythonVersion": ">=3.10",
|
||||||
"PythonPath": {},
|
"PythonPath": {},
|
||||||
|
@ -11,16 +11,16 @@ CPL internal tool to set pip URL for CLI by environment
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "set_pip_urls"
|
__title__ = 'set_pip_urls'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'
|
||||||
__version__ = "2022.12.0"
|
__version__ = '2022.12.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2022", minor="12", micro="0")
|
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
||||||
|
@ -11,16 +11,16 @@ CPL internal tool to set version from branch name
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "set_version"
|
__title__ = 'set_version'
|
||||||
__author__ = "Sven Heidemann"
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = "MIT"
|
__license__ = 'MIT'
|
||||||
__copyright__ = "Copyright (c) 2022 sh-edraft.de"
|
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'
|
||||||
__version__ = "2022.12.0"
|
__version__ = '2022.12.0'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major="2022", minor="12", micro="0")
|
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
||||||
|
Loading…
Reference in New Issue
Block a user