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
"""Plugin for pylint to allow gcloud type inference. | |
Supports: | |
- Specifying the return type of an instance methods in the case | |
that no arguments are passed in. | |
""" | |
import importlib | |
import astroid |
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
>>> import numpy as np | |
>>> bool(np.array([])) | |
False | |
>>> bool(np.array([1])) | |
True | |
>>> bool(np.array([0])) | |
False | |
>>> bool(np.array([0,0])) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> |
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
$ git grep "Needs docstring" | |
gcloud/connection.py: """Needs docstring.""" | |
gcloud/datastore/connection.py: """Needs docstring.""" | |
gcloud/datastore/connection.py: """Needs docstring.""" | |
gcloud/datastore/connection.py: """Needs docstring.""" | |
gcloud/datastore/connection.py: """Needs docstring.""" | |
gcloud/datastore/connection.py: """Needs docstring.""" | |
gcloud/datastore/dataset.py: """Needs docstring.""" | |
gcloud/datastore/dataset.py: """Needs docstring.""" | |
gcloud/datastore/dataset.py: """Needs docstring.""" |
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
$ git grep "Class data attribute docstring" | |
gcloud/storage/_helpers.py: """Class data attribute docstring.""" | |
gcloud/storage/_helpers.py: """Class data attribute docstring.""" | |
gcloud/storage/_helpers.py: """Class data attribute docstring.""" | |
gcloud/storage/bucket.py: """Class data attribute docstring.""" | |
gcloud/storage/bucket.py: """Class data attribute docstring.""" | |
gcloud/storage/bucket.py: """Class data attribute docstring.""" | |
gcloud/storage/key.py: """Class data attribute docstring.""" | |
gcloud/storage/key.py: """Class data attribute docstring.""" | |
gcloud/storage/key.py: """Class data attribute docstring.""" |
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
"""Simple utility to check config consistency. | |
Parses the production and test lint config files and makes | |
sure the test config inherits from the production config. | |
""" | |
import ConfigParser | |
PRODUCTION_RC = 'pylintrc_default' |
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
$ travis login --github-token=`cat travis.token` | |
$ if [ "`git rev-parse --show-toplevel`" == "`pwd`" ]; then echo "at top level"; fi | |
at top level | |
$ travis env list --repo dhermes/gcloud-python | |
# environment variables for dhermes/gcloud-python | |
$ travis encrypt-file regression/djh_key.p12 \ | |
> --repo dhermes/gcloud-python | |
... encrypted_d4f2fba7a94f_key ... | |
$ mv djh_key.p12.enc regression/ | |
$ travis env list --repo dhermes/gcloud-python |
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
https://travis-ci.org/dhermes/gcloud-python/builds/38858843 | |
INSTALL: | |
-------- | |
pip install coveralls - 10.44s | |
pip install pep8 - 0.54s | |
pip install pylint - 3.36s | |
pip install unittest2 - 1.26s | |
pip install nose - 0.33s | |
pip install coverage - 0.33s |
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
https://travis-ci.org/dhermes/gcloud-python/builds/38970047 | |
------------------------------------------------------------ ------ | |
export WHEELHOUSE="`pwd`/travis-wheels/wheelhouse/" 0.01s | |
pip install --no-index --find-links=${WHEELHOUSE} ./ 3.47s | |
pip install --no-index --find-links=${WHEELHOUSE} coverage 0.48s | |
pip install --no-index --find-links=${WHEELHOUSE} nose 0.35s | |
pip install --no-index --find-links=${WHEELHOUSE} nosexcover 0.39s | |
pip install --no-index --find-links=${WHEELHOUSE} pep8 0.49s | |
pip install --no-index --find-links=${WHEELHOUSE} pylint 2.12s |
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
>>> class A(object): | |
... bar = None | |
... def __fu(self, bar): | |
... self.bar = bar | |
... def public_fu(self, bar): | |
... self.__fu(bar) | |
... | |
>>> a = A() | |
>>> print (a, a.bar) | |
(<__main__.A object at 0x7fd5d0274810>, None) |