Skip to content
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

PR: Add support for numeric literals with underscores highlighting in Python 3.6 #7505

Merged
merged 3 commits into from
Jul 19, 2018

Conversation

dalthviz
Copy link
Member

Pull Request Checklist

  • Read and followed this repo's Contributing Guidelines
  • Based your PR on the latest version of the correct branch (master or 3.x)
  • Followed PEP8 for code style
  • Ensured your pull request hasn't eliminated unrelated blank lines/spaces,
    modified the spyder/defaults directory, or added new icons/assets
  • Wrote at least one-line docstrings for any new functions
  • Added at least one unit test covering the changes, if at all possible
  • Described your changes and the motivation for them below
  • Noted what issue(s) this pull request resolves, creating one if needed
  • Included a screenshot, if this PR makes any visible changes to the UI

Description of Changes

Change regex for number syntax highlighting in Python 3.6 to support new numeric literal syntax.

A preview:

imagen

Issue(s) Resolved

Fixes #7324

@dalthviz dalthviz added this to the v3.3.1 milestone Jul 19, 2018
@dalthviz dalthviz self-assigned this Jul 19, 2018
@dalthviz dalthviz requested a review from ccordoba12 July 19, 2018 17:52
@pep8speaks
Copy link

pep8speaks commented Jul 19, 2018

Hello @dalthviz! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on July 19, 2018 at 18:58 Hours UTC

r"\b[+-]?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?[jJ]?\b"]
# Needed to achieve correct highlighting in Python 3.6
# See issue 7324
if PY36:
Copy link
Member

@goanpeca goanpeca Jul 19, 2018

Choose a reason for hiding this comment

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

this should be larger than and not tied to 36 right?

@ccordoba12 ccordoba12 merged commit d8897f6 into spyder-ide:3.x Jul 19, 2018
ccordoba12 added a commit that referenced this pull request Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants