def get_type(self):
        for card, pattern in CARDS.items():
            if pattern.match(self.number):
                return card
        return None
Return the type if it matches one of the cards.
dataset/ETHPy150Open spookylukey/django-paypal/paypal/pro/creditcard.py/CreditCard.get_type