Created
July 22, 2015 02:51
-
-
Save SpainTrain/b5d4689156f0190700ef to your computer and use it in GitHub Desktop.
Add file to `PYTHONPATH` and run as pylint plugin: `pylint --load-plugins gae_pylint_plugin` (See also http://docs.pylint.org/plugins.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astroid import MANAGER | |
from astroid import scoped_nodes | |
NDB_PROPERTIES = [ | |
'DateTimeProperty', | |
'StringProperty', | |
'KeyProperty', | |
'StructuredProperty' | |
] | |
def register(linter): | |
pass | |
def transform(modu): | |
if modu.name == 'google.appengine.ext.ndb': | |
for f in NDB_PROPERTIES: | |
modu.locals[f] = [scoped_nodes.Class(f, None)] | |
MANAGER.register_transform(scoped_nodes.Module, transform) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wrote this to rid my project of
no-member
pylint errors due to the google app engine python library dynamically mucking with__all__
. This is obviously not a full solution, but can be easily extended with other "missing" members.See also: