Pycharm's code style inspection: ignore/switch off specific rules

前端 未结 5 664
悲哀的现实
悲哀的现实 2021-01-01 09:17

I\'m trying to import existing project into PyCharm. I can refactor the code so that PyCharm will be pleased, but we like to have spaces around colons in dictionaries, like

5条回答
  •  感动是毒
    2021-01-01 09:27

    @Krzysztof Stanisławek, function is different as Pycharm follows the PEP8 coding style, so it is recommended that there is no whitespace between the function variables and ":", if you don't want this, you can disable it by

    "Settings"-> "Editor"-> "Inspections"->"PEP8 coding style violation"
    

    However, this is not recommended.

提交回复
热议问题