Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Async indent - #214

Merged
winstliu merged 5 commits into
atom:masterfrom
kbrose:async-indent
Oct 20, 2017
Merged

winstliu merged 5 commits into
atom:masterfrom
kbrose:async-indent

Conversation

@kbrose

@kbrose kbrose commented Oct 18, 2017

Copy link
Copy Markdown
Contributor

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Add async syntax to indentation regex

Alternate Designs

None.

Benefits

Python 3.5 introduced async syntax, this will allow proper indentation when using said syntax.

Possible Drawbacks

None.............................?

Applicable Issues

Not an issue, but this PR #152 has been open for > 1 year.

Comment thread spec/language-python-spec.coffee Outdated
beforeEach ->
waitsForPromise ->
atom.workspace.open('sample.py').then (o) ->
atom.workspace.open('../../sample.py').then (o) ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can actually just be atom.workspace.open(). No need to specify a filename.

Comment thread settings/language-python.cson Outdated
'tabLength': 4
'commentStart': '# '
'increaseIndentPattern': '^\\s*(class|def|elif|else|except|finally|for|if|try|with|while)\\b.*:\\s*$'
'increaseIndentPattern': '^\\s*(class|def|elif|else|except|finally|for|if|try|with|while|async def|async for|async with)\\b.*:\\s*$'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about async\\s+(def|for|with)?

@winstliu
winstliu merged commit ccd1b74 into atom:master Oct 20, 2017
@kbrose
kbrose deleted the async-indent branch October 21, 2017 17:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants