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

PyCQA / astroid / 1717
91%
main: 92%

Build:
Build:
LAST BUILD BRANCH: regex-brain
DEFAULT BRANCH: main
Ran 03 Apr 2020 12:36PM UTC
Jobs 5
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
1717

push

travis-ci

PCManticore
Inspect compiled CFFI extension members

To use a CFFI extension, its "lib" symbol gives access to the exported
C symbols and its "ffi" symbol gives access to low-level utilities.
An import such as the following is required:

  from _compiled_extension_module import ffi
  from _compiled_extension_module import lib

Then in the code, these objects are used to access the C symbols:

  pp = ffi.cast('struct mystruct *', p)
  lib.exported_c_function(pp)

Even if "_compiled_extension_module" is added to
AstroidManager.extension_package_whitelist, the "ffi" and "lib" objects
are not analyzed properly since they do not fall into any of the
supported categories of objects. A dummy "builtin.module" node is
inserted in their place preventing tools like pylint to properly detect
object membership. Thus producing invalid errors:

  Instance of 'module' has no 'cast' member [no-member]
  Instance of 'module' has no 'exported_c_function' member [no-member]

Both these objects define __all__ attributes which lists their exported
symbols. The presence of __all__ means that dir(member) will work and
that object_build may be called recursively on that member.

Insert a Module node to represent these objects and add their members to
the built AST.

Link: https://cffi.readthedocs.io/en/latest/overview.html#main-mode-of-usage
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>

7614 of 8406 relevant lines covered (90.58%)

4.47 hits per line

Jobs
ID Job ID Ran Files Coverage
3 1717.3 (TOXENV=py35) 03 Apr 2020 12:36PM UTC 0
88.5
Travis Job 1717.3
4 1717.4 (TOXENV=pypy) 03 Apr 2020 12:38PM UTC 0
88.91
Travis Job 1717.4
5 1717.5 (TOXENV=py36) 03 Apr 2020 12:36PM UTC 0
89.81
Travis Job 1717.5
6 1717.6 (TOXENV=py37) 03 Apr 2020 12:37PM UTC 0
89.9
Travis Job 1717.6
7 1717.7 (TOXENV=py38) 03 Apr 2020 12:37PM UTC 0
90.18
Travis Job 1717.7
Source Files on build 1717
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1717
  • 2da60a08 on github
  • Prev Build on master (#1715)
  • Next Build on master (#1718)
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