octoprint_auth_ldap   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A __plugin_load__() 0 10 1
1
# coding=utf-8
2
from __future__ import absolute_import
3
4
from octoprint_auth_ldap.plugin import AuthLDAPPlugin
5
6
__plugin_name__ = "Auth LDAP"
7
__plugin_pythoncompat__ = ">=2.7,<4"
8
9
10
def __plugin_load__():
11
    # noinspection PyGlobalUndefined
12
    global __plugin_implementation__
13
    __plugin_implementation__ = AuthLDAPPlugin()
14
15
    # noinspection PyGlobalUndefined
16
    global __plugin_hooks__
17
    __plugin_hooks__ = {
18
        "octoprint.access.users.factory": __plugin_implementation__.ldap_user_factory,
19
        "octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.check_config
20
    }
21