Applying black formatting

- Fixing flake8 configuration to agree with black
- Adding black validation check to github actions
This commit is contained in:
Jacob Alexander
2021-10-01 11:00:22 -07:00
parent 5dade41aeb
commit 6e7fffd7de
51 changed files with 2536 additions and 1837 deletions

View File

@@ -9,16 +9,16 @@ def writeAddressBook():
alice = addressBook.person.add()
alice.id = 123
alice.name = 'Alice'
alice.email = 'alice@example.com'
alice.name = "Alice"
alice.email = "alice@example.com"
alicePhones = [alice.phone.add()]
alicePhones[0].number = "555-1212"
alicePhones[0].type = addressbook.Person.MOBILE
bob = addressBook.person.add()
bob.id = 456
bob.name = 'Bob'
bob.email = 'bob@example.com'
bob.name = "Bob"
bob.email = "bob@example.com"
bobPhones = [bob.phone.add(), bob.phone.add()]
bobPhones[0].number = "555-4567"
bobPhones[0].type = addressbook.Person.HOME
@@ -34,15 +34,14 @@ def printAddressBook(message_string):
addressBook.ParseFromString(message_string)
for person in addressBook.person:
print(person.name, ':', person.email)
print(person.name, ":", person.email)
for phone in person.phone:
print(phone.type, ':', phone.number)
print(phone.type, ":", phone.number)
print()
if __name__ == '__main__':
if __name__ == "__main__":
for i in range(10000):
message_string = writeAddressBook()
printAddressBook(message_string)