Skip to content

Commit 215507d

Browse files
committed
Reformat using latest Black
1 parent f5a24c3 commit 215507d

File tree

11 files changed

+21
-21
lines changed

11 files changed

+21
-21
lines changed

Diff for: emacs-the-best-python-editor/PyEval/pyeval_expression.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def result(self):
6666
return self._output_string
6767

6868
def parse(self):
69-
""" Parses the current infix expression, and return the RPN version."""
69+
"""Parses the current infix expression, and return the RPN version."""
7070

7171
# If we've already evaluated, just return the result
7272
if self._evaluated:

Diff for: emacs-the-best-python-editor/PyEval/pyeval_operand.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Operand:
1111
"""
1212

1313
def __init__(self, operand_string):
14-
""" Create a new operator object. """
14+
"""Create a new operator object."""
1515

1616
# String to hold the operand literal
1717
self.op_string = operand_string

Diff for: emacs-the-best-python-editor/PyEval/pyeval_operator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Operator:
3232
"""
3333

3434
def __init__(self, operator_string):
35-
""" Create a new operator object. """
35+
"""Create a new operator object."""
3636

3737
# String to hold the operator
3838
self._op_string = operator_string

Diff for: intro-to-threading/prodcom_better_queue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def producer(queue, event):
1818

1919

2020
def consumer(queue, event):
21-
""" Pretend we're saving a number in the database. """
21+
"""Pretend we're saving a number in the database."""
2222
while not event.is_set() or not pipeline.empty():
2323
message = queue.get()
2424
logging.info(

Diff for: intro-to-threading/prodcom_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def producer(pipeline, event):
5757

5858

5959
def consumer(pipeline, event):
60-
""" Pretend we're saving a number in the database. """
60+
"""Pretend we're saving a number in the database."""
6161
datapoint = 0
6262
while not event.is_set():
6363
datapoint = pipeline.get_value("Consumer")

Diff for: intro-to-threading/prodcom_lock.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def producer(pipeline):
5151

5252

5353
def consumer(pipeline):
54-
""" Pretend we're saving a number in the database. """
54+
"""Pretend we're saving a number in the database."""
5555
message = 0
5656
while message is not SENTINEL:
5757
message = pipeline.get_message("Consumer")

Diff for: intro-to-threading/prodcom_queue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def producer(pipeline, event):
3434

3535

3636
def consumer(pipeline, event):
37-
""" Pretend we're saving a number in the database. """
37+
"""Pretend we're saving a number in the database."""
3838
while not event.is_set() or not pipeline.empty():
3939
message = pipeline.get_message("Consumer")
4040
logging.info(

Diff for: opencv-color-spaces/finding-nemo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145

146146

147147
def segment_fish(image):
148-
""" Attempts to segment the clown fish out of the provided image. """
148+
"""Attempts to segment the clown fish out of the provided image."""
149149
hsv_image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
150150
light_orange = (1, 190, 200)
151151
dark_orange = (18, 255, 255)

Diff for: python-bindings/tasks.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@invoke.task
1717
def clean(c):
18-
""" Remove any built objects """
18+
"""Remove any built objects"""
1919
for file_pattern in (
2020
"*.o",
2121
"*.so",
@@ -41,7 +41,7 @@ def print_banner(msg):
4141

4242
@invoke.task()
4343
def build_cmult(c, path=None):
44-
""" Build the shared library for the sample C code """
44+
"""Build the shared library for the sample C code"""
4545
# Moving this type hint into signature causes an error (???)
4646
c: invoke.Context
4747
if on_win:
@@ -65,7 +65,7 @@ def build_cmult(c, path=None):
6565

6666
@invoke.task()
6767
def test_ctypes(c):
68-
""" Run the script to test ctypes """
68+
"""Run the script to test ctypes"""
6969
print_banner("Testing ctypes Module")
7070
# pty and python3 didn't work for me (win).
7171
if on_win:
@@ -76,7 +76,7 @@ def test_ctypes(c):
7676

7777
@invoke.task()
7878
def build_cffi(c):
79-
""" Build the CFFI Python bindings """
79+
"""Build the CFFI Python bindings"""
8080
print_banner("Building CFFI Module")
8181
ffi = cffi.FFI()
8282

@@ -109,14 +109,14 @@ def build_cffi(c):
109109

110110
@invoke.task()
111111
def test_cffi(c):
112-
""" Run the script to test CFFI """
112+
"""Run the script to test CFFI"""
113113
print_banner("Testing CFFI Module")
114114
invoke.run("python cffi_test.py", pty=not on_win)
115115

116116

117117
@invoke.task()
118118
def build_cppmult(c):
119-
""" Build the shared library for the sample C++ code """
119+
"""Build the shared library for the sample C++ code"""
120120
print_banner("Building C++ Library")
121121
invoke.run(
122122
"g++ -O3 -Wall -Werror -shared -std=c++11 -fPIC cppmult.cpp "
@@ -138,22 +138,22 @@ def compile_python_module(cpp_name, extension_name):
138138

139139
@invoke.task(build_cppmult)
140140
def build_pybind11(c):
141-
""" Build the pybind11 wrapper library """
141+
"""Build the pybind11 wrapper library"""
142142
print_banner("Building PyBind11 Module")
143143
compile_python_module("pybind11_wrapper.cpp", "pybind11_example")
144144
print("* Complete")
145145

146146

147147
@invoke.task()
148148
def test_pybind11(c):
149-
""" Run the script to test PyBind11 """
149+
"""Run the script to test PyBind11"""
150150
print_banner("Testing PyBind11 Module")
151151
invoke.run("python3 pybind11_test.py", pty=True)
152152

153153

154154
@invoke.task(build_cppmult)
155155
def build_cython(c):
156-
""" Build the cython extension module """
156+
"""Build the cython extension module"""
157157
print_banner("Building Cython Module")
158158
# Run cython on the pyx file to create a .cpp file
159159
invoke.run("cython --cplus -3 cython_example.pyx -o cython_wrapper.cpp")
@@ -165,7 +165,7 @@ def build_cython(c):
165165

166166
@invoke.task()
167167
def test_cython(c):
168-
""" Run the script to test Cython """
168+
"""Run the script to test Cython"""
169169
print_banner("Testing Cython Module")
170170
invoke.run("python3 cython_test.py", pty=True)
171171

@@ -182,5 +182,5 @@ def test_cython(c):
182182
test_cython,
183183
)
184184
def all(c):
185-
""" Build and run all tests """
185+
"""Build and run all tests"""
186186
pass

Diff for: serverless-sms-service/chalicelib/sms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def send(payload_params=None):
15-
""" send sms to the specified number """
15+
"""send sms to the specified number"""
1616
msg = tw_client.messages.create(
1717
from_=FROM_NUMBER, body=payload_params["msg"], to=TO_NUMBER
1818
)

Diff for: storing-images/storing_images.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, image, label):
7979
self.label = label
8080

8181
def get_image(self):
82-
""" Returns the image as a numpy array. """
82+
"""Returns the image as a numpy array."""
8383
image = np.frombuffer(self.image, dtype=np.uint8)
8484
return image.reshape(*self.size, self.channels)
8585

0 commit comments

Comments
 (0)