Skip to content
Snippets Groups Projects
PL1

Stubs.py will no longer call sys.exit(1) on error, but raise exception instead (Python3)

Merged Imported Juan Font Alonso requested to merge Stubs_py_no_more_sys_exit_py3 into python3

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Juan Font Alonso Title changed from Stubs.py will no longer call sys.exit(1) on error, but raise exception instead to Stubs.py will no longer call sys.exit(1) on error, but raise exception instead (Python3) · Imported

    Title changed from Stubs.py will no longer call sys.exit(1) on error, but raise exception instead to Stubs.py will no longer call sys.exit(1) on error, but raise exception instead (Python3)

    By Konrad Grochowski on 2016-06-21T11:23:32

  • Juan Font Alonso Added 1 commit: · Imported

    Added 1 commit:

    • dc98d135 - Stubs.py will no longer call sys.exit(1) on error, but raise exception instead

    By Konrad Grochowski on 2016-06-21T11:49:38

  • Author Contributor

    cTypesResultType is not a string, resType is :) second one - sorry, I was two quick with cherry-pick, commit amended.

    pylint (1.5.6) still generates 33 messages if called via make pylint, so I must have missed it.

    BTW: have you considered setting up tox configuration?

    By Konrad Grochowski on 2016-06-21T11:55:19

  • Author Contributor

    I have configured pylint to ignore these:

    let g:syntastic_python_checker_args = "--ignore=E501,E225"
    let g:syntastic_python_pylint_post_args = "--disable=C0103,C0301,W0212,C0111"

    i.e.

    Invalid attribute name
    Invalid method name
    Invalid function name
    Invalid constant name
    Line too long
    Missing method docstring
    Missing module docstring
    ...

    and other similar "phrasing", inconsequential things. I care about "real errors", though - hence the use of pylint and, more importantly, mypy :-)

    I was unaware of tox - added to TODO, thanks for mentioning it.

    By Thanassis Tsiodras on 2016-06-21T12:06:13

  • Juan Font Alonso mentioned in commit 9fa8e28a · Imported

    mentioned in commit 9fa8e28a

    By Thanassis Tsiodras on 2016-06-21T12:07:55

  • Juan Font Alonso Status changed to merged · Imported

    Status changed to merged

    By Thanassis Tsiodras on 2016-06-21T12:07:56

  • Author Contributor

    Needless to say - any contributions re:tox and especially re:mypy and type annotations... most welcome.

    Thanks for your contributions, most appreciated!

    By Thanassis Tsiodras on 2016-06-21T12:10:55

  • Author Contributor

    as for names in pylint - I've created pylint.cfg (pylint --generate-rcfile) file and in it you can easily reconfigure regexps used to validate names, line length etc. Later pylint call looks like this pylint --rcfile=pylint.cfg and configuration can be stored in repo and under version control etc.

    By Konrad Grochowski on 2016-06-21T12:12:01

Please register or sign in to reply
Loading