-
Notifications
You must be signed in to change notification settings - Fork 76
unclear message when gdb is not installed #10
base: master
Are you sure you want to change the base?
Conversation
|
I apologize for this amount of commits and small question, why indentations are incompatible with the pep8 ? |
|
Google uses different indentation than pep8. You might want to check Google Python Style Guide here http://google-styleguide.googlecode.com/svn/trunk/pyguide.html If you use Vim, you might want to use this setting:\ " Indent Python in the Google way.
setlocal indentexpr=GetGooglePythonIndent(v:lnum)
let s:maxoff = 50 " maximum number of lines to look backwards.
function GetGooglePythonIndent(lnum)
" Indent inside parens.
" Align with the open paren unless it is at the end of the line.
" E.g.
" open_paren_not_at_EOL(100,
" (200,
" 300),
" 400)
" open_paren_at_EOL(
" 100, 200, 300, 400)
call cursor(a:lnum, 1)
let [par_line, par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|String\\)$'")
if par_line > 0
call cursor(par_line, 1)
if par_col != col("$") - 1
return par_col
endif
endif
" Delegate the rest to the original function.
return GetPythonIndent(a:lnum)
endfunction
let pyindent_nested_paren="&sw*2"
let pyindent_open_paren="&sw*2" |
|
@vinitkumar : Thanks. This file should help me |
|
@sandlbn Yes, what I pasted was content of that file ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is only used once in __init__ (as soon as we know it's installed, we don't have to check anymore), I propose inlining this in the form of
executable_name = _GDB_ARGS[0]
if not distutils.spawn.find_executable(executable_name):
raise OSError('executable could not be found, is gdb installed?')(Also, a gentle reminder towards CONTRIBUTING.md. As this project is owned by Google, you'll have to sign a CLA before we can accept pull requests.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TehMillhouse Hi CLA signed I will try to push refactored code tomorrow.
|
Anybody working? Or should I take it? |
When gdb is not installed pyringe returns unclear message. Gdb is not installed by default in MacOS 10.9 .