Move from identity to equality
moved code from identity (`is` style check) to equality, ensure the same comparison is used throughout.
@@ -673,7 +673,7 @@ class PaymentCardNumber(str):
if card_number.brand in {PaymentCardBrand.visa, PaymentCardBrand.mastercard}:
required_length = 16
valid = len(card_number) == required_length
- elif card_number.brand is PaymentCardBrand.amex:
+ elif card_number.brand == PaymentCardBrand.amex:
required_length = 15
valid = len(card_number) == required_length
else:
