Skip to content

Commit 1b09506

Browse files
author
Mickey Beurskens
committed
Fix naming to be consistent with pep8
1 parent 91e4bd8 commit 1b09506

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: 9 - solid/dependency-inversion-after.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def is_authorized(self) -> bool:
2727
pass
2828

2929

30-
class Authorizer_SMS(Authorizer):
30+
class AuthorizerSMS(Authorizer):
3131

3232
def __init__(self):
3333
self.authorized = False
@@ -40,7 +40,7 @@ def is_authorized(self) -> bool:
4040
return self.authorized
4141

4242

43-
class Authorizer_Google(Authorizer):
43+
class AuthorizerGoogle(Authorizer):
4444

4545
def __init__(self):
4646
self.authorized = False
@@ -53,7 +53,7 @@ def is_authorized(self) -> bool:
5353
return self.authorized
5454

5555

56-
class Authorizer_Robot(Authorizer):
56+
class AuthorizerRobot(Authorizer):
5757

5858
def __init__(self):
5959
self.authorized = False
@@ -117,7 +117,7 @@ def pay(self, order):
117117
order.add_item("USB cable", 2, 5)
118118

119119
print(order.total_price())
120-
authorizer = Authorizer_Robot()
120+
authorizer = AuthorizerRobot()
121121
# authorizer.verify_code(465839)
122122
authorizer.not_a_robot()
123123
processor = PaypalPaymentProcessor("[email protected]", authorizer)

Diff for: 9 - solid/interface-segregation-after.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def pay(self, order):
2828
pass
2929

3030

31-
class PaymentProcessor_SMS(PaymentProcessor):
31+
class PaymentProcessorSMS(PaymentProcessor):
3232

3333
@abstractmethod
3434
def auth_sms(self, code):
@@ -39,7 +39,7 @@ def pay(self, order):
3939
pass
4040

4141

42-
class DebitPaymentProcessor(PaymentProcessor_SMS):
42+
class DebitPaymentProcessor(PaymentProcessorSMS):
4343

4444
def __init__(self, security_code):
4545
self.security_code = security_code
@@ -68,7 +68,7 @@ def pay(self, order):
6868
order.status = "paid"
6969

7070

71-
class PaypalPaymentProcessor(PaymentProcessor_SMS):
71+
class PaypalPaymentProcessor(PaymentProcessorSMS):
7272

7373
def __init__(self, email_address):
7474
self.email_address = email_address

0 commit comments

Comments
 (0)