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

PyCQA / astroid / 1717 / 6
91%
main: 92%

Build:
Build:
LAST BUILD BRANCH: regex-brain
DEFAULT BRANCH: main
Ran 03 Apr 2020 12:37PM UTC
Files 72
Run time 8s
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

03 Apr 2020 12:34PM UTC coverage: 89.903% (+0.02%) from 89.886%
TOXENV=py37

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>

7586 of 8438 relevant lines covered (89.9%)

0.9 hits per line

Source Files on job 1717.6 (TOXENV=py37)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1280
  • Travis Job 1717.6
  • 2da60a08 on github
  • Prev Job for TOXENV=py37 on master (#1715.6)
  • Next Job for TOXENV=py37 on master (#1718.6)
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