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

wheerd / multiset / 8575140849
97%

Build:
DEFAULT BRANCH: master
Ran 05 Apr 2024 08:07PM UTC
Jobs 7
Files 3
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

05 Apr 2024 08:07PM UTC coverage: 97.394% (+0.003%) from 97.391%
8575140849

push

github

web-flow
Support mypy typing (#127)

* Support mypy typing

The big change here is to convert the library from a "single file module"
to a "packages" module. Here there is only only one package and we use an
__init__.py with `from .multiset import *` to continue to allow `from
multiset import Multiset` and similar. As crazy as it sounds I don't think
there's any way to signal to mypy with the py.typed file that the library
has type stubs without restructuring like this.

I also made some small changes to multiset.pyi to bring it in line with what
mypy wants.

A wheel package built with `python -m build` or `python -m build --wheel`
will now create a directory under site-packages containing multiset.py,
multiset.pyi, and py.typed, rather than just putting multiset.py into
site-packages as it did previously. If we publish this on pypi, clients of
the library will be able to use it typed without `type: ignore` comments
and will be able to type their Multisets like this and catch more bugs as
well as not getting told off by mypy:

```
from multiset import Multiset

m = Multiset[int | float] = Multiset([1, 2.2, 9, 33.8])
m1.add("hello")  # mypy says 'Argument 1 to "add" of "Multiset" has incompatible type "str"; expected "int | float"'
```

Cool!

* Update Makefiles with new location of code

---------

Co-authored-by: Manuel Krebber <admin@wheerd.de>

540 of 609 branches covered (88.67%)

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

897 of 921 relevant lines covered (97.39%)

3.41 hits per line

Jobs
ID Job ID Ran Files Coverage
3 run-3.12 - 8575140849.3 05 Apr 2024 08:07PM UTC 0
97.4
GitHub Action Run
4 run-3.8 - 8575140849.4 05 Apr 2024 08:07PM UTC 0
97.4
GitHub Action Run
5 run-3.10 - 8575140849.5 05 Apr 2024 08:07PM UTC 0
97.4
GitHub Action Run
6 run-3.11 - 8575140849.6 05 Apr 2024 08:07PM UTC 0
97.4
GitHub Action Run
7 run-3.9 - 8575140849.7 05 Apr 2024 08:07PM UTC 0
97.4
GitHub Action Run
6 run-3.8 - 8575022051.6 05 Apr 2024 07:55PM UTC 0
97.39
GitHub Action Run
1 run-3.8 - 7707485964.1 30 Jan 2024 07:04AM UTC 0
97.39
GitHub Action Run
Source Files on build 8575140849
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8575140849
  • 73e3b4e0 on github
  • Prev Build on master (#8575022051)
  • Next Build on master (#8575477637)
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