Skip to content

Commit 71ebc78

Browse files
committed
Resolve circular import
1 parent 0c5a06f commit 71ebc78

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎rope/base/project.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import warnings
88
from abc import ABC, abstractmethod
99
from contextlib import ExitStack
10-
from typing import Optional, cast
10+
from typing import Optional, cast, TYPE_CHECKING
1111

1212
import rope.base.fscommands # Use full qualification for clarity.
1313
import rope.base.resourceobserver as resourceobserver
14-
from rope.base import exceptions, history, pycore, pyobjectsdef, taskhandle, utils
14+
from rope.base import exceptions, history, pycore, taskhandle, utils
1515
from rope.base.exceptions import ModuleNotFoundError
1616

1717
# At present rope.base.prefs starts with `# type:ignore`.
@@ -25,6 +25,10 @@
2525
import pickle # type: ignore
2626

2727

28+
if TYPE_CHECKING:
29+
from rope.base import pyobjectsdef
30+
31+
2832
class _Project(ABC):
2933
prefs: Prefs
3034
data_files: _DataFiles

0 commit comments

Comments
 (0)