Remove redundant variable type check

This commit is contained in:
codeking 2025-02-22 10:17:31 +01:00
parent 8d8de8244c
commit 9e9d825bb8

View file

@ -89,11 +89,9 @@ class WebServiceApiService:
@staticmethod @staticmethod
def get_subscription(billing_code: str, proxies: Optional[dict] = None): 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 = billing_code.replace('-', '').upper() billing_code = '-'.join(billing_code_fragments)
billing_code_fragments = re.findall('....?', billing_code)
billing_code = '-'.join(billing_code_fragments)
response = WebServiceApiService.__get('/subscriptions/current', billing_code, proxies) response = WebServiceApiService.__get('/subscriptions/current', billing_code, proxies)