-
Notifications
You must be signed in to change notification settings - Fork 152
investigate escaping jumping to definition (and other features) with spaces #406
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
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0a56f16
try with bad spaces
bollwyvl 24da4fb
linting
bollwyvl 82b48d5
[atest] overhaul globals, jupyter config
bollwyvl e99ffd8
get pedantic on encodings: only utf-8 in this repo, users???
bollwyvl 0e32480
[atest] fix virtualdoc dir variable
bollwyvl fef0e2f
try finding diagnostics that _contain_ canary (vs start with)
bollwyvl c0c153c
Merge remote-tracking branch 'upstream/master' into fix-gh-403-spaces
bollwyvl bb39801
hopefully demonstrate reproducible jump fail with spaces and umlaut path
bollwyvl 86f5abe
rework handling of uri to contents path in jump
bollwyvl 89102dd
rename jump destination from uri to contents_path throughout
bollwyvl 2e43577
linting
bollwyvl d43b547
add some docs, remove some logging use of decodeURI
bollwyvl 49e0954
update changelog
bollwyvl 3f1ffbb
Update CHANGELOG.md
krassowski c82eb1b
Update CHANGELOG.md
krassowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
*** Settings *** | ||
Suite Setup Setup Suite For Screenshots gh-403 | ||
Force Tags feature:jump-to-definition gh:403 | ||
Resource ../Keywords.robot | ||
|
||
*** Variables *** | ||
${FOLDER WITH SPACE} a földer | ||
|
||
*** Test Cases *** | ||
Python Jumps between Files | ||
Copy Files to Folder With Spaces jump_a.py jump_b.py | ||
${def} = Set Variable a_function_definition | ||
Open ${FOLDER WITH SPACE}/jump_b.py in ${MENU EDITOR} | ||
Wait Until Fully Initialized | ||
${sel} = Set Variable xpath:(//span[contains(@class, 'cm-variable')][contains(text(), '${def}')])[last()] | ||
Jump To Definition ${sel} | ||
Wait Until Page Contains ANOTHER_CONSTANT | ||
Capture Page Screenshot 10-jumped.png | ||
|
||
*** Keywords *** | ||
Copy Files to Folder With Spaces | ||
[Arguments] @{files} | ||
FOR ${file} IN @{files} | ||
Copy File examples${/}${file} ${NOTEBOOK DIR}${/}${FOLDER WITH SPACE}${/}${file} | ||
END |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""work with jupyter config""" | ||
|
||
import json | ||
from pathlib import Path | ||
|
||
ENC = dict(encoding="utf-8") | ||
|
||
|
||
def update_jupyter_config(path, has_traits, **key_values): | ||
"""update an existing jupyter_notebook_config.json""" | ||
p = Path(path) | ||
conf = json.loads(p.read_text(**ENC)) | ||
|
||
for key, value in key_values.items(): | ||
conf.setdefault(has_traits, {})[key] = value | ||
|
||
p.write_text(json.dumps(conf, indent=2, sort_keys=True), **ENC) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A_CONSTANT = "constant" | ||
ANOTHER_CONSTANT = "another constant" | ||
|
||
def a_function_definition(n: int=1) -> str: | ||
return A_CONSTANT * n |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from jump_a import a_function_definition, A_CONSTANT | ||
|
||
|
||
assert a_function_definition() == A_CONSTANT |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.