Skip to content

Commit 8f48054

Browse files
authored
Merge pull request #38 from justmobilize/re-add-slash-signatures
Re-add slashed into signatures
2 parents 1b2d687 + 9ce6506 commit 8f48054

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

circuitpython_typing/__init__.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,14 @@ class ByteStream(Protocol):
7676
* `usb_cdc.Serial`
7777
"""
7878

79-
# Should be `, /)`, but not available in Python 3.7.
80-
def read(self, count: Optional[int] = None) -> Optional[bytes]:
79+
def read(self, count: Optional[int] = None, /) -> Optional[bytes]:
8180
"""Read ``count`` bytes from the stream.
8281
If ``count`` bytes are not immediately available,
8382
or if the parameter is not specified in the call,
8483
the outcome is implementation-dependent.
8584
"""
8685

87-
# Should be `, /)`, but not available in Python 3.7.
88-
def write(self, buf: ReadableBuffer) -> Optional[int]:
86+
def write(self, buf: ReadableBuffer, /) -> Optional[int]:
8987
"""Write the bytes in ``buf`` to the stream."""
9088

9189

circuitpython_typing/io.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ def value(self) -> float:
3838
on the specifics of the class.
3939
"""
4040

41-
# TODO: this should be `value(self, input_value: float, /)` but can't
42-
# because currently mpy files are built and the `/` param isn't supported
43-
# in micro-python.
44-
# https://github.com/adafruit/Adafruit_CircuitPython_Typing/issues/36
4541
# pylint: disable=no-self-use,unused-argument
4642
@value.setter
47-
def value(self, input_value: float):
43+
def value(self, input_value: float, /):
4844
...

0 commit comments

Comments
 (0)