8000 fix broken links by angelafunk · Pull Request #2239 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

fix broken links #2239

< 10000 div class="d-flex flex-order-2 flex-md-order-1 mx-2">
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

Merged
merged 3 commits into from
Jul 23, 2019
Merged

fix broken links #2239

merged 3 commits into from
Jul 23, 2019

Conversation

angelafunk
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 26, 2019
Copy link
Contributor
@gguuss gguuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the tests in this source tree are failing lint:

Filtering based on changed files.
nox > Running session lint(sample='./appengine/standard/ndb/entities')
nox > Creating virtualenv using python in /tmp/lint-sample-appengine-standard-ndb-entities
nox > pip install flake8 flake8-import-order
nox > cd ./appengine/standard/ndb/entities
nox > flake8 --show-source --builtin gettext --max-complexity 20 --import-order-style google --exclude .nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py --ignore=E121,E123,E126,E226,E24,E704,W503,W504,I100,I201,I202 --application-import-names snippets_test,snippets .
./snippets_test.py:67:30: F821 undefined name 'long'
    assert isinstance(ident, long)
                             ^
./snippets_test.py:93:30: F821 undefined name 'long'
    assert isinstance(ident, long)
                             ^
./snippets_test.py:127:40: F821 undefined name 'long'
    assert isinstance(result.key.id(), long)
                                       ^
nox > Command flake8 --show-source --builtin gettext --max-complexity 20 --import-order-style google --exclude .nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py --ignore=E121,E123,E126,E226,E24,E704,W503,W504,I100,I201,I202 --application-import-names snippets_test,snippets . failed with exit code 1
nox > Session lint(sample='./appengine/standard/ndb/entities') failed.
The command "./scripts/travis.sh" exited with 1.

I recommend you remove the isinstance tests as they're adjacent to other tests that should sufficiently check the API is working.

removed the isinstance tests as they're adjacent to other tests that should sufficiently check the API is working
Copy link
Contributor
@gguuss gguuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like my initial feedback was a little off, in cases where the result is unused, lint is failing:

nox > flake8 --show-source --builtin gettext --max-complexity 20 --import-order-style google --exclude .nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py --ignore=E121,E123,E126,E226,E24,E704,W503,W504,I100,I201,I202 --application-import-names snippets_test,snippets .
./snippets_test.py:16:1: F401 'google.appengine.ext.ndb' imported but unused
from google.appengine.ext import ndb
^
./snippets_test.py:24:5: F841 local variable 'result' is assigned to but never used
    result = snippets.create_entity_using_keyword_arguments()
    ^
./snippets_test.py:28:5: F841 local variable 'result' is assigned to but never used
    result = snippets.create_entity_using_attributes()
    ^
./snippets_test.py:32:5: F841 local variable 'result' is assigned to but never used
    result = snippets.create_entity_using_populate()
    ^
./snippets_test.py:47:5: F841 local variable 'result' is assigned to but never used
    result = snippets.save_entity(
    ^
./snippets_test.py:54:5: F841 local variable 'result' is assigned to but never used
    result = snippets.get_entity(sandy_key)
    ^
./snippets_test.py:67:5: F841 local variable 'result' is assigned to but never used
    result = snippets.get_url_safe_key(sandy_key)
    ^
./snippets_test.py:115:5: F841 local variable 'result' is assigned to but never used
    result = snippets.create_entity_with_generated_id()
    ^
nox > Command flake8 --show-source --builtin gettext --max-complexity 20 --import-order-style google --exclude .nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py --ignore=E121,E123,E126,E226,E24,E704,W503,W504,I100,I201,I202 --application-import-names snippets_test,snippets . failed with exit code 1
nox > Session lint(sample='./appengine/standard/ndb/entities') failed.

In cases where the results are unused, consider adding a check for the expected result variable.

Copy link
Contributor
@gguuss gguuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gguuss gguuss merged commit 481ab5a into GoogleCloudPlatform:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0