-
Notifications
You must be signed in to change notification settings - Fork 6.6k
fix broken links #2239
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
fix broken links #2239
Conversation
There was a problem hiding this 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
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.