Skip to content

Commit f646123

Browse files
fix: update import path for hello_world function
1 parent 8d347b8 commit f646123

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,6 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
209+
# Pycharm
210+
.idea/

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,10 @@ It will now automatically run on the files changed when trying to commit. To run
9393
```console
9494
uv run pre-commit run --all-files
9595
```
96+
97+
### Project structure in Pycharm
98+
To get the correct project structure in Pycharm (and get correct import resolution in IDE), you need to set the source root for the `src` folder.
99+
100+
1. Right-click on the `src` folder in the project view.
101+
2. Select "Mark Directory as" from the context menu.
102+
3. Choose "Sources Root" from the submenu.

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ name = "sevan-internal-package-index"
2020
url = "https://api.repoforge.io/EYvhW6SyL/"
2121

2222
[tool.pytest.ini_options]
23-
pythonpath = [
24-
"src"
25-
]
23+
pythonpath = ["src"]
2624

2725
[tool.ruff]
2826
src = ["src"]

src/__init__.py

Whitespace-only changes.

tests/test_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from src.main import hello_world
1+
from main import hello_world
22

33

44
def test_hello_world():

0 commit comments

Comments
 (0)