Skip to content

Commit

Permalink
Fix naming to be consistent with pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickey Beurskens committed Nov 30, 2021
1 parent 91e4bd8 commit 1b09506
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions 9 - solid/dependency-inversion-after.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def is_authorized(self) -> bool:
pass


class Authorizer_SMS(Authorizer):
class AuthorizerSMS(Authorizer):

def __init__(self):
self.authorized = False
Expand All @@ -40,7 +40,7 @@ def is_authorized(self) -> bool:
return self.authorized


class Authorizer_Google(Authorizer):
class AuthorizerGoogle(Authorizer):

def __init__(self):
self.authorized = False
Expand All @@ -53,7 +53,7 @@ def is_authorized(self) -> bool:
return self.authorized


class Authorizer_Robot(Authorizer):
class AuthorizerRobot(Authorizer):

def __init__(self):
self.authorized = False
Expand Down Expand Up @@ -117,7 +117,7 @@ def pay(self, order):
order.add_item("USB cable", 2, 5)

print(order.total_price())
authorizer = Authorizer_Robot()
authorizer = AuthorizerRobot()
# authorizer.verify_code(465839)
authorizer.not_a_robot()
processor = PaypalPaymentProcessor("[email protected]", authorizer)
Expand Down
6 changes: 3 additions & 3 deletions 9 - solid/interface-segregation-after.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def pay(self, order):
pass


class PaymentProcessor_SMS(PaymentProcessor):
class PaymentProcessorSMS(PaymentProcessor):

@abstractmethod
def auth_sms(self, code):
Expand All @@ -39,7 +39,7 @@ def pay(self, order):
pass


class DebitPaymentProcessor(PaymentProcessor_SMS):
class DebitPaymentProcessor(PaymentProcessorSMS):

def __init__(self, security_code):
self.security_code = security_code
Expand Down Expand Up @@ -68,7 +68,7 @@ def pay(self, order):
order.status = "paid"


class PaypalPaymentProcessor(PaymentProcessor_SMS):
class PaypalPaymentProcessor(PaymentProcessorSMS):

def __init__(self, email_address):
self.email_address = email_address
Expand Down

0 comments on commit 1b09506

Please sign in to comment.