File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
doc/data/messages/n/no-member Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ If you are getting the dreaded ``no-member`` error, there is a possibility that
2
2
either:
3
3
4
4
- pylint found a bug in your code
5
- - You're launching pylint without the dependencies installed in its environment.
6
- - pylint would need to lint a C extension module and is refraining to do so.
5
+ - You're launching pylint without the dependencies installed in its environment
6
+ - pylint would need to lint a C extension module and is refraining to do so
7
+ - pylint does not understand dynamically generated code
7
8
8
9
Linting C extension modules is not supported out of the box, especially since
9
10
pylint has no way to get an AST object out of the extension module.
@@ -27,3 +28,10 @@ build AST objects from all the C extensions that pylint encounters::
27
28
Alternatively, since pylint emits a separate error for attributes that cannot be
28
29
found in C extensions, ``c-extension-no-member ``, you can disable this error for
29
30
your project.
31
+
32
+ If something is generated dynamically, pylint won't be able to understand the code
33
+ from your library (c-extension or not). You can then specify generated attributes
34
+ with the ``generated-members `` option. For example if ``cv2.LINE_AA `` and
35
+ ``sphinx.generated_member `` create false positives for ``no-member ``, you can do::
36
+
37
+ $ pylint --generated-member=cv2.LINE_AA,sphinx.generated_member
You can’t perform that action at this time.
0 commit comments