Skip to content

Commit 599f6bc

Browse files
Corrects an more erroneous replacements of 'serial'.
1 parent 76efbfc commit 599f6bc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

serial_asyncio/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# SPDX-License-Identifier: BSD-3-Clause
99
"""\
10-
Support asyncio with pyserial_asyncio ports. EXPERIMENTAL
10+
Support asyncio with serial ports. EXPERIMENTAL
1111
1212
Posix platforms only, Python 3.4+ only.
1313
@@ -29,7 +29,7 @@ class SerialTransport(asyncio.Transport):
2929
This allows protocol implementations to be developed against the
3030
transport abstraction without needing to know the details of the
3131
underlying channel, such as whether it is a pipe, a socket, or
32-
indeed a serial_asyncio port.
32+
indeed a serial port.
3333
3434
3535
You generally won’t instantiate a transport yourself; instead, you
@@ -67,7 +67,7 @@ def serial(self):
6767
return self._serial
6868

6969
def __repr__(self):
70-
return '{self.__class__.__name__}({self._loop}, {self._protocol}, {self.serial_asyncio})'.format(self=self)
70+
return '{self.__class__.__name__}({self._loop}, {self._protocol}, {self.serial})'.format(self=self)
7171

7272
def is_closing(self):
7373
"""Return True if the transport is closing or closed."""
@@ -108,7 +108,7 @@ def write(self, data):
108108
try:
109109
n = self._serial.write(data)
110110
except serial.SerialException as exc:
111-
self._fatal_error(exc, 'Fatal write error on serial_asyncio transport')
111+
self._fatal_error(exc, 'Fatal write error on serial transport')
112112
return
113113
if n == len(data):
114114
return # Whole request satisfied
@@ -221,7 +221,7 @@ def _write_ready(self):
221221
222222
This method is called back asynchronously as a writer
223223
registered with the asyncio event-loop against the
224-
underlying file descriptor for the serial_asyncio port.
224+
underlying file descriptor for the serial port.
225225
226226
Should the write-buffer become empty if this method
227227
is invoked while the transport is closing, the protocol's
@@ -239,7 +239,7 @@ def _write_ready(self):
239239
except (BlockingIOError, InterruptedError):
240240
self._write_buffer.append(data)
241241
except serial.SerialException as exc:
242-
self._fatal_error(exc, 'Fatal write error on serial_asyncio transport')
242+
self._fatal_error(exc, 'Fatal write error on serial transport')
243243
else:
244244
if n == len(data):
245245
assert self._flushed()
@@ -291,7 +291,7 @@ def _set_write_buffer_limits(self, high=None, low=None):
291291
self._high_water = high
292292
self._low_water = low
293293

294-
def _fatal_error(self, exc, message='Fatal error on serial_asyncio transport'):
294+
def _fatal_error(self, exc, message='Fatal error on serial transport'):
295295
"""Report a fatal error to the event-loop and abort the transport."""
296296
self._loop.call_exception_handler({
297297
'message': message,
@@ -341,7 +341,7 @@ def _call_connection_lost(self, exc):
341341
"""Close the connection.
342342
343343
Informs the protocol through connection_lost() and clears
344-
pending buffers and closes the serial_asyncio connection.
344+
pending buffers and closes the serial connection.
345345
"""
346346
assert self._closing
347347
assert not self._has_writer

test/test_asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# This file is part of pySerial-asyncio - Cross platform serial_asyncio port support for Python
3+
# This file is part of pySerial-asyncio - Cross platform seria port support for Python
44
# (C) 2016 Chris Liechti <cliechti@gmx.net>
55
#
66
# SPDX-License-Identifier: BSD-3-Clause
@@ -30,7 +30,7 @@ class Test_asyncio(unittest.TestCase):
3030

3131
def setUp(self):
3232
self.loop = asyncio.get_event_loop()
33-
# create a closed serial_asyncio port
33+
# create a closed serial port
3434

3535
def tearDown(self):
3636
self.loop.close()

0 commit comments

Comments
 (0)