RefactoringRope/FileSystemCommands.py

branch
eric7
changeset 413
a4cba20ad7ab
parent 412
6fa5892b9097
child 426
7592a1c052e8
diff -r 6fa5892b9097 -r a4cba20ad7ab RefactoringRope/FileSystemCommands.py
--- a/RefactoringRope/FileSystemCommands.py	Sat Dec 23 15:48:55 2023 +0100
+++ b/RefactoringRope/FileSystemCommands.py	Sat Dec 23 17:58:35 2023 +0100
@@ -9,6 +9,8 @@
 
 import os
 
+import rope.base.fscommands
+
 
 class RefactoringClientFileSystemCommands:
     """
@@ -22,8 +24,6 @@
         @param client reference to the refactoring client
         @type RefactoringClient
         """
-        import rope.base.fscommands
-
         self.__client = client
         self.__normal_actions = rope.base.fscommands.FileSystemCommands()
 
@@ -100,6 +100,7 @@
         @param path filename of file to write to
         @type str
         @param data data to be written
+        @type Any
         """
         self.__normal_actions.write(path, data)
 
@@ -184,15 +185,16 @@
         """
         Private method called by rope to remove a file or directory.
 
-        @param path name of file/directory to remove (string)
+        @param path name of file/directory to remove
+        @type str
         """
+        from eric7.EricWidgets.EricApplication import ericApp
+
         vcs = self.__project.getVcs()
         if vcs is None:
             if os.path.isdir(path):
                 self.__project.removeDirectory(path)
             else:
-                from EricWidgets.EricApplication import ericApp
-
                 ericApp().getObject("ViewManager").closeWindow(path)
                 self.__project.removeFile(path)
         else:

eric ide

mercurial