From 9e9d825bb862a11e20f69af321d82f6334533102 Mon Sep 17 00:00:00 2001 From: codeking Date: Sat, 22 Feb 2025 10:17:31 +0100 Subject: [PATCH] Remove redundant variable type check --- core/services/WebServiceApiService.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/services/WebServiceApiService.py b/core/services/WebServiceApiService.py index 94bd4b0..c1e7583 100644 --- a/core/services/WebServiceApiService.py +++ b/core/services/WebServiceApiService.py @@ -89,11 +89,9 @@ class WebServiceApiService: @staticmethod def get_subscription(billing_code: str, proxies: Optional[dict] = None): - if billing_code is not None: - - billing_code = billing_code.replace('-', '').upper() - billing_code_fragments = re.findall('....?', billing_code) - billing_code = '-'.join(billing_code_fragments) + billing_code = billing_code.replace('-', '').upper() + billing_code_fragments = re.findall('....?', billing_code) + billing_code = '-'.join(billing_code_fragments) response = WebServiceApiService.__get('/subscriptions/current', billing_code, proxies)