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

agronholm / typeguard / 262
95%

Build:
DEFAULT BRANCH: master
Ran 22 Aug 2020 07:53PM UTC
Jobs 4
Files 3
Run time 3min
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

pending completion
262

push

travis-ci-com

web-flow
Correctly match package/module names in import hook (#144)

The previously used regular expression tried to handle both exact
matches and and prefix matches in one go, using this approach:

    re.compile(r'^%s\.?' % pkg)

However, this is incorrect, since the literal dot is optional in the
pattern, causing longer matches to also get included. For example, ‘foo’
should match ‘foo’ and ‘foo.bar’, but it also incorrectly matches
‘foobar’:

    >>> re.compile(r'^foo\.?').match('foobar')
    <_sre.SRE_Match object; span=(0, 3), match='foo'>

In practice, a command like this (using the pytest plugin as an example)
is supposed to check the ‘flask’ package and any modules below it:

    pytest --typeguard-packages=flask

... but in reality it also checks other packages, such as
‘flask_sqlalchemy’ and ‘flask_redis’, if those happen to be installed.

This can be easily fixed by not using regular expression, but simple
string matching instead.

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

598 of 675 relevant lines covered (88.59%)

3.47 hits per line

Jobs
ID Job ID Ran Files Coverage
2 262.2 (COVERALLS_PARALLEL=true TOXENV=py35) 22 Aug 2020 07:53PM UTC 0
85.8
Travis Job 262.2
3 262.3 (COVERALLS_PARALLEL=true TOXENV=py36) 22 Aug 2020 07:53PM UTC 0
87.57
Travis Job 262.3
4 262.4 (COVERALLS_PARALLEL=true TOXENV=py37) 22 Aug 2020 07:53PM UTC 0
86.69
Travis Job 262.4
5 262.5 (COVERALLS_PARALLEL=true TOXENV=py38) 22 Aug 2020 07:53PM UTC 0
86.54
Travis Job 262.5
Source Files on build 262
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #262
  • 55fbcb57 on github
  • Prev Build on master (#255)
  • Next Build on master (#272)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc