Skip to content

Commit 83c9baf

Browse files
committed
fix: don't use editor.Project.from_id
1 parent b055acc commit 83c9baf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

scratchattach/editor/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ def from_sb3(cls, data: str | bytes | TextIOWrapper | BinaryIO, load_assets: boo
208208

209209
return project
210210

211-
@deprecated("Use get_project(id).body() instead")
212211
@staticmethod
212+
@deprecated("Use get_project(id).body() instead")
213213
def from_id(project_id: int, _name: Optional[str] = None):
214214
raise Exception("This method is deprecated")
215215
# _proj = get_project(project_id)

tests/test_editor_project.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import sys
22

3+
34
def test_import():
4-
sys.path.insert(0, ".")
5-
from scratchattach import editor
6-
proj = editor.Project.from_id(104)
5+
sys.path.insert(0, ".")
6+
import scratchattach as sa
7+
8+
proj = sa.get_project(104)
9+
body = proj.body()

0 commit comments

Comments
 (0)