User Tools

Site Tools


pycharm_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
pycharm_notes [2021/11/12 23:33] – [release history] rajupycharm_notes [2023/02/14 22:13] – [configure pycharm with pytest] raju
Line 1: Line 1:
 ===== dummy ===== ===== dummy =====
 +==== configure pycharm with pytest ====
 +<code>
 +File -> Settings -> Tools -> Python Integrated Tools -> Testing -> Default test runner -> select pytest from the dropdown -> OK
 +</code>
 +
 +Tested with pycharm 2022.1
 +
 +Ref: https://stackoverflow.com/questions/6397063/how-do-i-configure-pycharm-to-run-py-test-tests
 +
 +==== mark import as used ====
 +On the unused import line press Alt+Enter -> "Optimize imports" -> Disable inspection
 +
 +Ref:- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206592765-Marking-an-import-to-prevent-deleting-it-with-optimize-imports-
 +
 +To revert back to the normal behaviour
 +
 +Ctrl+Alt+s -> Inspections -> search for "unresolved references" -> select the one in Python -> check
 +
 +Ref:- https://intellij-support.jetbrains.com/hc/en-us/community/posts/206585365-Unused-imports-not-highlighted
 +
 ==== copy function name with the class name ==== ==== copy function name with the class name ====
   * ctrl+alt+shift+c   * ctrl+alt+shift+c
Line 20: Line 40:
 <code> <code>
 released, version released, version
 +2022-08-16, 2022.2.1
 +2022-04-12, 2022.1
 2021-07-27, 2021.2 2021-07-27, 2021.2
 2021-04-06, 2021.1 2021-04-06, 2021.1
pycharm_notes.txt · Last modified: 2023/04/04 20:23 by admin