From c739eb23bb260ebb5ae595633c32a2956974a16a Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 11 May 2023 17:21:52 +0100 Subject: vyos.util: T5195: remove the unused camel case to snake case function that was replaced with Humps in all sciprts --- python/vyos/util.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'python') 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 -- cgit v1.2.3