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

PyCQA / astroid / 1687
90%
main: 92%

Build:
Build:
LAST BUILD BRANCH: regex-brain
DEFAULT BRANCH: main
Ran 04 Mar 2020 05:21PM UTC
Jobs 3
Files 72
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

pending completion
1687

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

7547 of 8382 relevant lines covered (90.04%)

2.68 hits per line

Jobs
ID Job ID Ran Files Coverage
4 1687.4 (TOXENV=pypy) 04 Mar 2020 05:22PM UTC 0
88.72
Travis Job 1687.4
5 1687.5 (TOXENV=py36) 04 Mar 2020 05:21PM UTC 0
89.48
Travis Job 1687.5
6 1687.6 (TOXENV=py37) 04 Mar 2020 05:22PM UTC 0
89.57
Travis Job 1687.6
Source Files on build 1687
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1687
  • fd8c53e5 on github
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