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

pynamodb / PynamoDB / 2831 / 4
95%
devel: 95%

Build:
Build:
LAST BUILD BRANCH: bug/remove_wrong_docstring
DEFAULT BRANCH: devel
Ran 22 Apr 2020 03:31PM UTC
Files 22
Run time 3s
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

22 Apr 2020 03:30PM UTC coverage: 94.896% (-0.07%) from 94.963%
AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id

push

travis-ci

web-flow
<a href="https://github.com/pynamodb/PynamoDB/commit/<a class=hub.com/pynamodb/PynamoDB/commit/63b01ecf8987ed98e92d78c6abb8c94520ad6236">63b01ecf8<a href="https://github.com/pynamodb/PynamoDB/commit/63b01ecf8987ed98e92d78c6abb8c94520ad6236">&quot;&gt;Make (GS,LS)Index an indexable type in runtime (#769)

Following </a><a class="double-link" href="https://github.com/pynamodb/PynamoDB/commit/<a class="double-link" href="https://github.com/pynamodb/PynamoDB/commit/5426ed9081e91316b214d6c10b447cfa1da8b0af">5426ed908</a>">5426ed908</a><a href="https://github.com/pynamodb/PynamoDB/commit/63b01ecf8987ed98e92d78c6abb8c94520ad6236">, users found themselves having to write some rather unergonomic code to reconcile Python&#39;s and a type-checker&#39;s perspectives:

    if TYPE_CHECKING:
        _MyModelGSI = GlobalSecondaryIndex[&quot;MyModel&quot;]
    else:
        _MyModelGSI = GlobalSecondaryIndex

    class MyModelUserIdGSI(_MyModelGSI):
        &quot;&quot;&quot;A GSI for looking up by user ID.&quot;&quot;&quot;
       ...

    class MyModelEmailGSI(_MyModelGSI):
        &quot;&quot;&quot;A GSI for looking up by email.&quot;&quot;&quot;
       ...

This addresses it by allowing users to rewrite this as:

    class MyModelUserIdGSI(GlobalSecondaryIndex[&quot;MyModel&quot;]):
        &quot;&quot;&quot;A GSI for looking up by user ID.&quot;&quot;&quot;
       ...

    class MyModelEmailGSI(GlobalSecondaryIndex[&quot;MyModel&quot;]):
        &quot;&quot;&quot;A GSI for looking up by email.&quot;&quot;&quot;
       ...

Since we maintain Python 2 compatibility, we cannot assume the typing module is available so we're making a mock Generic class instead.

2566 of 2704 relevant lines covered (94.9%)

0.95 hits per line

Source Files on job 2831.4 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id)
  • Tree
  • List 0
  • Changed 7
  • Source Changed 3
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2511
  • Travis Job 2831.4
  • 63b01ecf on github
  • Prev Job for AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id on master (#2815.1)
  • Next Job for AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id on master (#2840.1)
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

© 2025 Coveralls, Inc