gred.lldap.bootstrap: removed helper functions

This commit is contained in:
eyjhb 2024-12-22 22:05:16 +01:00
parent 570b41ac5d
commit 062a3c0a12
No known key found for this signature in database
GPG key ID: 609F508E3239F920

View file

@ -4,8 +4,7 @@ import gql
from gql.dsl import DSLQuery, DSLSchema, dsl_gql, DSLMutation from gql.dsl import DSLQuery, DSLSchema, dsl_gql, DSLMutation
from gql.transport.aiohttp import AIOHTTPTransport from gql.transport.aiohttp import AIOHTTPTransport
from pprint import pprint from .utils import to_camelcase, to_snakecase
import re
import logging import logging
@ -13,15 +12,6 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
def to_camelcase(s):
s = re.sub(r"(_|-)+", " ", s).title().replace(" ", "").replace("*", "")
return "".join([s[0].lower(), s[1:]])
def to_snakecase(s):
return re.sub(r"(?<!^)(?=[A-Z])", "_", s).lower()
class AttributeTypes: class AttributeTypes:
STRING = "STRING" STRING = "STRING"
INTEGER = "INTEGER" INTEGER = "INTEGER"