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

PyCQA / astroid / 1689
91%
main: 92%

Build:
Build:
LAST BUILD BRANCH: regex-brain
DEFAULT BRANCH: main
Ran 04 Mar 2020 06:02PM UTC
Jobs 5
Files 72
Run time 2min
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
1689

push

travis-ci

PCManticore
Transform boto3.ServiceRequest to look like dynamic class

`boto3.resource` creates resources dynamically via a resource factory.
Unfortunately that completely breaks static analysis leading to spurious
false positives since pylint cannot determine sanely that attributes
exist or not.

Here's an example of accessing the Topic class out of the `sns` resource.
As you can see, the class is created dynamically rather than existing
in the codebase itself:

```
In [2]: boto3.resource
Out[2]: <function boto3.resource(*args, **kwargs)>

In [3]: boto3.resource('sns')
Out[3]: sns.ServiceResource()

In [4]: boto3.resource('sns').Topic
Out[4]: <bound method ResourceFactory._create_class_partial.<locals>.create_resource of sns.ServiceResource()>
```

This patch adds a fake `__getattr__` method to `ServiceRequest`.
This will prevent `pylint` from emitting `no-member` at all for `ServiceRequest`
instances, but that is a good solution for now until we can load typeshed-like
annotation packages.

Close PyCQA/pylint#3134

7566 of 8384 relevant lines covered (90.24%)

4.46 hits per line

Jobs
ID Job ID Ran Files Coverage
3 1689.3 (TOXENV=py35) 04 Mar 2020 06:02PM UTC 0
88.17
Travis Job 1689.3
4 1689.4 (TOXENV=pypy) 04 Mar 2020 06:04PM UTC 0
88.72
Travis Job 1689.4
5 1689.5 (TOXENV=py36) 04 Mar 2020 06:02PM UTC 0
89.48
Travis Job 1689.5
6 1689.6 (TOXENV=py37) 04 Mar 2020 06:03PM UTC 0
89.57
Travis Job 1689.6
7 1689.7 (TOXENV=py38) 04 Mar 2020 06:03PM UTC 0
89.85
Travis Job 1689.7
Source Files on build 1689
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1689
  • 01b5b572 on github
  • Prev Build on master (#1686)
  • Next Build on master (#1690)
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