• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

savannahghi / sghi-commons / 8646058490
100%
develop: 100%

Build:
Build:
LAST BUILD BRANCH: chore-upgrade-deps
DEFAULT BRANCH: develop
Ran 11 Apr 2024 11:39AM UTC
Jobs 1
Files 13
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Apr 2024 11:37AM UTC coverage: 100.0%. Remained the same
8646058490

push

github

web-flow
feat(task): add `sghi.task.Task` composition support (#36)

Add support for `sghi.task.Task` instances composition. `Task` instances
can be composed using the `<<` and `>>` operators. See the example
below:

```python
import operator
from functools import partial

from sghi.task import Task, task

add_100: Task[int, int] = task(partial(operator.add, 100))
int_from_str: Task[str, int] = task(int)
int_to_str: Task[int, str] = task(str)
mul_by_10: Task[int, int] = task(partial(operator.mul, 10))

chained: Task[int, str] = add_100 >> mul_by_10 >> int_to_str
composed: Task[str, int] = add_100 << mul_by_10 << int_from_str

assert isinstance(chained, Task)
assert isinstance(composed, Task)

assert chained(50) == "1500"
assert composed("50") == 600
```

299 of 299 branches covered (100.0%)

Branch coverage included in aggregate %.

20 of 20 new or added lines in 1 file covered. (100.0%)

757 of 757 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8646058490.1 11 Apr 2024 11:39AM UTC 0
100.0
Source Files on build 8646058490
Detailed source file information is not available for this build.
  • Back to Repo
  • 249c2753 on github
  • Prev Build on next (#8636549511)
  • Next Build on next (#8650549083)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc