-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper use of generated-members= setting #2498
Comments
@gpakosz |
Any news about this problem ? I can confirm what @PCManticore mentioned, but in our case we have a Pylint configuration file used accross several projets / components and we cannot add all the generated members (the list would be huge). |
Same issue. Nothing I've tried works. |
Introduce pylint to do deeper analysis of the code than flake8 supports. Currently, only errors and warnings are enabled (not suggested refactoring and convention violations), and this change fixes the code so that pylint passes. The fixes fall into a few categories: * Renaming variables to avoid conflicts with built-in function names. This was by far the biggest category of warnings. This doesn't affect class field names so should have no impact on SQLAlchemy. The frequent offenders were `id`, `type`, `filter`, and `zip`. * Logging calls that formatted messages with the `%` operator; these now pass the format arguments to the logging functions. * Implicit int conversion of SQLAlchemy numeric column objects. These work but pylint doesn't know about them, so they now have explicit `int()` wrappers. Thanks to limitations/bugs in pylint, there were some errors that weren't possible to clean up by changing the code, so they're disabled here: * `no-member` is the big one: pylint complains about all the dynamically-created functions on SQLAlchemy objects (e.g., the `filter` method on queries) and the config option that's supposed to let you manually tell it which names get added to which classes is broken right now: pylint-dev/pylint#2498 * Unused argument checking is disabled for functions that are passed as callbacks to libraries. * In the test code, we need to set environment variables before importing Flask modules with side effects, so the "all imports have to be at the top of the module" check is disabled there. * pytest doesn't let you define test classes with initializer functions, so the "attribute defined outside initializer" check is disabled there.
Introduce pylint to do deeper analysis of the code than flake8 supports. Currently, only errors and warnings are enabled (not suggested refactoring and convention violations), and this change fixes the code so that pylint passes. The fixes fall into a few categories: * Renaming variables to avoid conflicts with built-in function names. This was by far the biggest category of warnings. This doesn't affect class field names so should have no impact on SQLAlchemy. The frequent offenders were `id`, `type`, `filter`, and `zip`. * Logging calls that formatted messages with the `%` operator; these now pass the format arguments to the logging functions. * Implicit int conversion of SQLAlchemy numeric column objects. These work but pylint doesn't know about them, so they now have explicit `int()` wrappers. Thanks to limitations/bugs in pylint, there were some errors that weren't possible to clean up by changing the code, so they're disabled here: * `no-member` is the big one: pylint complains about all the dynamically-created functions on SQLAlchemy objects (e.g., the `filter` method on queries) and the config option that's supposed to let you manually tell it which names get added to which classes is broken right now: pylint-dev/pylint#2498 * Unused argument checking is disabled for functions that are passed as callbacks to libraries. * In the test code, we need to set environment variables before importing Flask modules with side effects, so the "all imports have to be at the top of the module" check is disabled there. * pytest doesn't let you define test classes with initializer functions, so the "attribute defined outside initializer" check is disabled there.
Introduce pylint to do deeper analysis of the code than flake8 supports. Currently, only errors and warnings are enabled (not suggested refactoring and convention violations), and this change fixes the code so that pylint passes. The fixes fall into a few categories: * Renaming variables to avoid conflicts with built-in function names. This was by far the biggest category of warnings. This doesn't affect class field names so should have no impact on SQLAlchemy. The frequent offenders were `id`, `type`, `filter`, and `zip`. * Logging calls that formatted messages with the `%` operator; these now pass the format arguments to the logging functions. * Implicit int conversion of SQLAlchemy numeric column objects. These work but pylint doesn't know about them, so they now have explicit `int()` wrappers. Thanks to limitations/bugs in pylint, there were some errors that weren't possible to clean up by changing the code, so they're disabled here: * `no-member` is the big one: pylint complains about all the dynamically-created functions on SQLAlchemy objects (e.g., the `filter` method on queries) and the config option that's supposed to let you manually tell it which names get added to which classes is broken right now: pylint-dev/pylint#2498 * Unused argument checking is disabled for functions that are passed as callbacks to libraries. * In the test code, we need to set environment variables before importing Flask modules with side effects, so the "all imports have to be at the top of the module" check is disabled there. * pytest doesn't let you define test classes with initializer functions, so the "attribute defined outside initializer" check is disabled there.
any updates? |
* Fix #2498: add generated-members match against the qualified name Add test for fully qualified generated-members Co-authored-by: Gauthier Sebaux <gauthier.sebaux@wavestone.com> Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Question
Hello, I'm using the Google Drive Python API and the following snippet generates
E1101
:What's the proper way to silence these
E1101
?I tried this in my
.pylintrc
without success:And trying a broader match doesn't help either:
The text was updated successfully, but these errors were encountered: