Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make chain a class like the standard sync chain #103

Merged
merged 6 commits into from
Mar 20, 2023
Merged

Make chain a class like the standard sync chain #103

merged 6 commits into from
Mar 20, 2023

Conversation

polyipseity
Copy link
Contributor

There are still an inconsistency between the this version and the sync version:

  • The sync version is actually implemented in C, which allows their from_iterable() to invoke an native constructor not exposed in Python, so they can return chain[T]. This version simply returns a AsyncIterator[T] instead of chain[T].

Fixes #102.

Fixes [GH#102](#102).

Signed-off-by: William So <polyipseity@gmail.com>
@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (cecf2cd) 99.25% compared to head (44f909f) 99.25%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #103   +/-   ##
=======================================
  Coverage   99.25%   99.25%           
=======================================
  Files          20       20           
  Lines        2012     2017    +5     
  Branches      307      308    +1     
=======================================
+ Hits         1997     2002    +5     
  Misses         10       10           
  Partials        5        5           
Impacted Files Coverage Δ
asyncstdlib/itertools.py 99.06% <100.00%> (+0.02%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

asyncstdlib/itertools.py Outdated Show resolved Hide resolved
asyncstdlib/itertools.py Outdated Show resolved Hide resolved
Signed-off-by: William So <polyipseity@gmail.com>
Signed-off-by: William So <polyipseity@gmail.com>
Signed-off-by: William So <polyipseity@gmail.com>
Signed-off-by: William So <polyipseity@gmail.com>
Signed-off-by: William So <polyipseity@gmail.com>
@maxfischer2781 maxfischer2781 self-requested a review March 9, 2023 10:22
Copy link
Owner

@maxfischer2781 maxfischer2781 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to go. Thank you for your contribution, I will merge this later on and prepare a release soon.

@maxfischer2781 maxfischer2781 merged commit d7bddaa into maxfischer2781:master Mar 20, 2023
@polyipseity polyipseity deleted the chain-from-iterable branch March 20, 2023 09:17
polyipseity added a commit to polyipseity/pytextgen that referenced this pull request Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chain.from_iterable does not play nice inside VSCode
2 participants