lundi 27 juin 2022

How to implement a constructor for an abstract class?

I need to convert(refactor) a given class to abstract class, but I'm having trouble to converts this constructor:

  def __init__(self, app_id, client_id, token):
        self.app_id = app_id
        self.entities_url = f"{URL}/v1/schema/{app_id}/en"
        self.attribute_url = f"{URL2}/v1/schema/{app_id}/attr"
        self.eb_headers = {
            'Content-Type': 'application/json',
            'X_Client_ID': client_id,
            'token': token
        }

Aucun commentaire:

Enregistrer un commentaire