Skip to content

Commit e17beb8

Browse files
committed
Fixing black issues
1 parent 844cd1d commit e17beb8

File tree

10 files changed

+10
-20
lines changed

10 files changed

+10
-20
lines changed

intro_to_threading/daemon_thread.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ def thread_function(name):
1212

1313
if __name__ == "__main__":
1414
format = "%(asctime)s: %(message)s"
15-
logging.basicConfig(format=format, level=logging.INFO,
16-
datefmt="%H:%M:%S")
15+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
1716

1817
logging.info("Main : before creating thread")
1918
x = threading.Thread(target=thread_function, args=(1,), daemon=True)

intro_to_threading/executor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ def thread_function(name):
1212

1313
if __name__ == "__main__":
1414
format = "%(asctime)s: %(message)s"
15-
logging.basicConfig(format=format, level=logging.INFO,
16-
datefmt="%H:%M:%S")
15+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
1716

1817
with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
1918
executor.map(thread_function, range(3))

intro_to_threading/fixrace.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ def locked_update(self, name):
2626

2727
if __name__ == "__main__":
2828
format = "%(asctime)s: %(message)s"
29-
logging.basicConfig(format=format, level=logging.INFO,
30-
datefmt="%H:%M:%S")
29+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
3130
# logging.getLogger().setLevel(logging.DEBUG)
3231

3332
database = FakeDatabase()

intro_to_threading/multiple_threads.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ def thread_function(name):
1212

1313
if __name__ == "__main__":
1414
format = "%(asctime)s: %(message)s"
15-
logging.basicConfig(format=format, level=logging.INFO,
16-
datefmt="%H:%M:%S")
15+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
1716

1817
threads = list()
1918
for index in range(3):

intro_to_threading/prodcom_better_queue.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def consumer(queue, event):
3030

3131
if __name__ == "__main__":
3232
format = "%(asctime)s: %(message)s"
33-
logging.basicConfig(format=format, level=logging.INFO,
34-
datefmt="%H:%M:%S")
33+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
3534

3635
pipeline = queue.Queue(maxsize=10)
3736
event = threading.Event()

intro_to_threading/prodcom_event.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ def consumer(pipeline, event):
6666

6767
if __name__ == "__main__":
6868
format = "%(asctime)s: %(message)s"
69-
logging.basicConfig(format=format, level=logging.INFO,
70-
datefmt='%H:%M:%S')
69+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
7170
# logging.getLogger().setLevel(logging.DEBUG)
7271

7372
pipeline = Pipeline()

intro_to_threading/prodcom_lock.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ def consumer(pipeline):
5959

6060
if __name__ == "__main__":
6161
format = "%(asctime)s: %(message)s"
62-
logging.basicConfig(format=format, level=logging.INFO,
63-
datefmt="%H:%M:%S")
62+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
6463
# logging.getLogger().setLevel(logging.DEBUG)
6564

6665
pipeline = Pipeline()

intro_to_threading/prodcom_queue.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ def consumer(pipeline, event):
4848

4949
if __name__ == "__main__":
5050
format = "%(asctime)s: %(message)s"
51-
logging.basicConfig(format=format, level=logging.INFO,
52-
datefmt="%H:%M:%S")
51+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
5352
# logging.getLogger().setLevel(logging.DEBUG)
5453

5554
pipeline = Pipeline()

intro_to_threading/racecond.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def update(self, name):
1919

2020
if __name__ == "__main__":
2121
format = "%(asctime)s: %(message)s"
22-
logging.basicConfig(format=format, level=logging.INFO,
23-
datefmt="%H:%M:%S")
22+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
2423

2524
database = FakeDatabase()
2625
logging.info("Testing update. Starting value is %d.", database.value)

intro_to_threading/single_thread.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ def thread_function(name):
1212

1313
if __name__ == "__main__":
1414
format = "%(asctime)s: %(message)s"
15-
logging.basicConfig(format=format, level=logging.INFO,
16-
datefmt="%H:%M:%S")
15+
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
1716

1817
logging.info("Main : before creating thread")
1918
x = threading.Thread(target=thread_function, args=(1,))

0 commit comments

Comments
 (0)