summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2023-05-11 17:21:52 +0100
committerDaniil Baturin <daniil@baturin.org>2023-05-11 17:21:52 +0100
commitc739eb23bb260ebb5ae595633c32a2956974a16a (patch)
treec7e59bc8f6fe3a32da52c99757d08b64b05cbc81 /python
parentc3f957b9bfc7233fe08d4dd65b80abf92097c81b (diff)
downloadvyos-1x-c739eb23bb260ebb5ae595633c32a2956974a16a.tar.gz
vyos-1x-c739eb23bb260ebb5ae595633c32a2956974a16a.zip
vyos.util: T5195: remove the unused camel case to snake case function
that was replaced with Humps in all sciprts
Diffstat (limited to 'python')
-rw-r--r--python/vyos/util.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py
index 0593184cc..d5330db13 100644
--- a/python/vyos/util.py
+++ b/python/vyos/util.py
@@ -1146,13 +1146,6 @@ def sysctl_write(name, value):
return True
return False
-# approach follows a discussion in:
-# https://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-snake-case
-def camel_to_snake_case(name: str) -> str:
- pattern = r'\d+|[A-Z]?[a-z]+|\W|[A-Z]{2,}(?=[A-Z][a-z]|\d|\W|$)'
- words = re.findall(pattern, name)
- return '_'.join(map(str.lower, words))
-
def load_as_module(name: str, path: str):
import importlib.util