From d3ca0cd0b342a7178221493d2a0fb18a69ca7efd Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 27 Oct 2025 15:27:50 +0300 Subject: [PATCH] Update PyCharm docs (#4389) * Add .idea.dist * Update PyCharm docs --- .idea.dist/repo.iml | 13 +++++++++++++ docs/editing.md | 14 +++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 .idea.dist/repo.iml diff --git a/.idea.dist/repo.iml b/.idea.dist/repo.iml new file mode 100644 index 000000000..a9ec5ee1a --- /dev/null +++ b/.idea.dist/repo.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/editing.md b/docs/editing.md index ba3fd6fce..42a92c5a8 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -46,10 +46,14 @@ see and install a number of recommended extensions. ## PyCharm/IntelliJ -If you decide to use PyCharm instead of VS Code, there are somethings to be -aware of. +### Setting up Python environment -### Pylib References +To make PyCharm recognize `anki` and `aqt` imports, you need to add source paths to _Settings > Project Structure_. +You can copy the provided .idea.dist directory to set up the paths automatically: -You'll need to use File>Project Structure to tell IntelliJ that pylib/ is a -sources root, so it knows references to 'anki' in aqt are valid. +``` +mkdir .idea && cd .idea +ln -sf ../.idea.dist/* . +``` + +You also need to add a new Python interpreter under _Settings > Python > Interpreter_ pointing to the Python executable under `out/pyenv` (available after building Anki).