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

Editor: Move to next line in run_selection() if nothing selected #3146

Merged
merged 2 commits into from
Jun 5, 2016

Conversation

jitseniesen
Copy link
Member

@jitseniesen jitseniesen commented May 2, 2016

Fixes #3115


@jitseniesen I rewrote the header to the standard we try to use (Fixes #<issue number>)

@jitseniesen
Copy link
Member Author

It seems to me from the log that the AppVeyor failure occured while the test environment is set up so it is not caused by anything in the pull request.

@goanpeca
Copy link
Member

goanpeca commented May 4, 2016

@jitseniesen Awesome :-), thanks for working on this.

Indeed, the appveyor tests are broken for some weeks now, @ccordoba12 will fix them soon :-)

@@ -1773,12 +1773,19 @@ def fix_indentation(self, index=None):

#------ Run
def run_selection(self):
"""Run selected text or current line in console"""
"""Run selected text or current line in console
If no text is selected, then advance cursor to next line."""
Copy link
Member

Choose a reason for hiding this comment

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

Minor style comment

Can we turn this into

"""
Run selected text or current line in console. If no text is selected, then
advance cursor to next line.
"""

@goanpeca
Copy link
Member

goanpeca commented May 4, 2016

LGTM 👍

Any comments @spyder-ide/core-developers

@goanpeca goanpeca added this to the v3.0beta4 milestone May 4, 2016
@blink1073
Copy link
Contributor

Yep, looks sensible to me.

@goanpeca
Copy link
Member

goanpeca commented May 4, 2016

_looks sensible to me_ WTF?

@blink1073
Copy link
Contributor

As in I agree with the approach, but did not actually test it ;).

@jitseniesen
Copy link
Member Author

Of course I'm happy to follow the house style (regarding formatting of docstrings), so I changed it. I tried to infer how you wanted it from other docstrings, but obviously failed.

@goanpeca
Copy link
Member

goanpeca commented May 4, 2016

@jitseniesen thanks for the changes... we do not have an specific style written somewhere, but what I am trying to promote is something in the lines of.

  • Docstrings are sentences, they need to end with a ..
  • Docstrings should have a quick one liner summary and a more lengthy description afterwards.
  • Doctsrings respect 80 characters length (PEP enforces a smaller value but mehhh...)
  • Doctsrings should ALWAYS use double tripple quotes and ALWAYS be written using a separate line as in:
# As in
def test()
    """
    Hello world.
    """

# Instead of 
def test()
    """Hello world."""

This makes the rule easy.... ALWAYS use that instead of one for one liners or another for whatever reason.

What do you think?

@jitseniesen
Copy link
Member Author

I think it makes sense for a more-than-one-(wo)man project to have style rules and it does not make much sense to argue long about them, so I'm happy to follow those rules.

@ccordoba12
Copy link
Member

Thanks for working on this @jitseniesen! Great addition :-)

@ccordoba12 ccordoba12 modified the milestones: v3.0beta3, v3.0beta4 May 13, 2016
@Nodd
Copy link
Contributor

Nodd commented May 30, 2016

What is preventing merging this PR ? Everything looks fine ?

@ccordoba12
Copy link
Member

If you feel it's ok, please merge it :-)

El 30/05/16 a las 09:23, Joseph Martinot-Lagarde escribió:

What is preventing merging this PR ? Everything looks fine ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3146 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAWS7SZP_bxV-VKLKOUxoAv8vjRL-RJwks5qGvLQgaJpZM4IVSm3.

@ccordoba12 ccordoba12 merged commit f23f7bc into spyder-ide:master Jun 5, 2016
@jitseniesen jitseniesen deleted the f9-moves-down branch June 5, 2016 11:23
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