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

pynamodb / PynamoDB / 2831
95%
devel: 95%

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

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.

2578 of 2704 relevant lines covered (95.34%)

4.75 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2831.1 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id) 22 Apr 2020 03:31PM UTC 0
94.93
Travis Job 2831.1
2 2831.2 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id) 22 Apr 2020 03:31PM UTC 0
94.93
Travis Job 2831.2
3 2831.3 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id) 22 Apr 2020 03:31PM UTC 0
94.9
Travis Job 2831.3
4 2831.4 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id) 22 Apr 2020 03:31PM UTC 0
94.9
Travis Job 2831.4
5 2831.5 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id) 22 Apr 2020 03:31PM UTC 0
94.93
Travis Job 2831.5
Source Files on build 2831
  • Tree
  • List 22
  • Changed 7
  • Source Changed 3
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #2831
  • 63b01ecf on github
  • Prev Build on master (#2815)
  • Next Build on master (#2840)
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