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 [2023/02/02 16:44] – [copy function name with the class name] 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 ==== ==== mark import as used ====
 On the unused import line press Alt+Enter -> "Optimize imports" -> Disable inspection 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- 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 ====
pycharm_notes.txt · Last modified: 2023/04/04 20:23 by admin