This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Tokenize function and parameter annotations#228
Merged
Conversation
Contributor
Author
added 2 commits
January 22, 2018 20:03
It's a bit too complicated to do now with annotations in the mix.
1 task
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Requirements
Description of the Change
Tokenizes optional function and parameter annotations in accordance with PEP-3107.
Alternate Designs
I looked at the three prior attempts.
#84 did not add support for function return-value annotations
#88 did not add highlighting for annotations
#95 when I was testing it didn't appear to support function return-value annotations
Benefits
Fully supports PEP-3107, which has been in effect since Python 3.0 was released.
Possible Drawbacks
This PR does include some minor relaxations in function definition syntax in order to more easily accommodate annotations. These changes also don't apply at all to Python 2 files.
Applicable Issues
Fixes #68
Supersedes and closes #84
Supersedes and closes #88
Supersedes and closes #95
@corylation @berdario @pchaigno many thanks for your PRs.
@corylation @berdario @pchaigno @MaximSokolov I'd like to merge this soon (probably by Tuesday/Wednesday), but if you have any issues with the scope names I'm using please tell me!