Skip to content

Commit 18146b6

Browse files
authored
Merge pull request #124 from pickwicksoft/bugfix/fix-codebase-problems
🧑‍💻 Make iterator error handler optional and pin poetry-publish
2 parents 393abc7 + c71f4da commit 18146b6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Build and publish to pypi
25-
uses: JRubics/poetry-publish@v2.1
25+
uses: JRubics/poetry-publish@4b3306307f536bbfcb559603629b3b4f6aef5ab8
2626
with:
2727
pypi_token: ${{ secrets.PYPI_API_TOKEN }}

pystreamapi/_itertools/tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# pylint: disable=protected-access
2-
from typing import Iterable
2+
from typing import Iterable, Optional
33

44
from pystreamapi._streams.error.__error import ErrorHandler, _sentinel
55

66

7-
def dropwhile(predicate, iterable, handler: ErrorHandler = None):
7+
def dropwhile(predicate, iterable, handler: Optional[ErrorHandler] = None):
88
"""
99
Drop items from the iterable while predicate(item) is true.
1010
Afterward, return every element until the iterable is exhausted.
@@ -24,7 +24,7 @@ def dropwhile(predicate, iterable, handler: ErrorHandler = None):
2424
_initial_missing = object()
2525

2626

27-
def reduce(function, sequence, initial=_initial_missing, handler: ErrorHandler = None):
27+
def reduce(function, sequence, initial=_initial_missing, handler: Optional[ErrorHandler] = None):
2828
"""
2929
Apply a function of two arguments cumulatively to the items of a sequence
3030
or iterable, from left to right, to reduce the iterable to a single

0 commit comments

Comments
 (0)