Skip to content

PyCharm Configuration

Nick Rossenbach edited this page Aug 12, 2020 · 17 revisions

In order to conveniently work with PyCharm on RETURNN, some modification to the settings can be made. This Guide is for PyCharm 2020.1.2, but should work for other versions as well.

Editor->Code Style->Python

  • change Scheme to Project
  • Tabs and Indents
    • Tabsize: 2
    • Indent: 2
    • Continuation Indent: 4
  • Wrapping and Braces
    • Disable all Align when multiline options (3 in total)

Editor->Inspections

  • change Profile to Project Default
  • Python->PEP8 coding style violation
    • Ignore Errors: E111 and E114 (4 spaces for code/comment)
  • Python->Missing or empty docstring
    • Enable weak warning or warning

Version Control->Commit

  • Commit message inspections:
    • enable all options
    • Limit body line -> right margin should be 72
    • Limit subject line -> right margin should be 50

Project: returnn->Project Structure

  • exclude:
    • docs/_build
    • docs/api
    • docs/returnn

As "Weak Warnings" might be difficult to see in the default style settings, the style can be changed under Editor->Color Scheme->General within the category: Errors and Warnings.