diff options
-rw-r--r-- | ranger/config/commands.py | 8 | ||||
-rw-r--r-- | ranger/container/directory.py (renamed from ranger/fsobject/directory.py) | 4 | ||||
-rw-r--r-- | ranger/container/file.py (renamed from ranger/fsobject/file.py) | 2 | ||||
-rw-r--r-- | ranger/container/fsobject.py (renamed from ranger/fsobject/fsobject.py) | 2 | ||||
-rw-r--r-- | ranger/core/actions.py | 2 | ||||
-rw-r--r-- | ranger/core/fm.py | 2 | ||||
-rw-r--r-- | ranger/fsobject/__init__.py | 8 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 1 |
8 files changed, 11 insertions, 18 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index b5b774a0..8d670731 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -507,7 +507,7 @@ class load_copy_buffer(Command): """ copy_buffer_filename = 'copy_buffer' def execute(self): - from ranger.fsobject import File + from ranger.container.file import File from os.path import exists try: fname = self.fm.confpath(self.copy_buffer_filename) @@ -650,7 +650,7 @@ class rename(Command): """ def execute(self): - from ranger.fsobject import File + from ranger.container.file import File from os import access new_name = self.rest(1) @@ -725,7 +725,7 @@ class bulkrename(Command): def execute(self): import sys import tempfile - from ranger.fsobject.file import File + from ranger.container.file import File from ranger.ext.shell_escape import shell_escape as esc py3 = sys.version > "3" @@ -773,7 +773,7 @@ class relink(Command): """ def execute(self): - from ranger.fsobject import File + from ranger.container.file import File new_path = self.rest(1) cf = self.fm.thisfile diff --git a/ranger/fsobject/directory.py b/ranger/container/directory.py index c7c5150f..878b4f1d 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/container/directory.py @@ -8,10 +8,10 @@ from os import stat as os_stat, lstat as os_lstat from collections import deque from time import time -from ranger.fsobject import BAD_INFO +from ranger.container.fsobject import BAD_INFO, FileSystemObject from ranger.core.loader import Loadable from ranger.ext.mount_path import mount_path -from ranger.fsobject import File, FileSystemObject +from ranger.container.file import File from ranger.core.shared import SettingsAware from ranger.ext.accumulator import Accumulator from ranger.ext.lazy_property import lazy_property diff --git a/ranger/fsobject/file.py b/ranger/container/file.py index 0b4f9776..b6a96a20 100644 --- a/ranger/fsobject/file.py +++ b/ranger/container/file.py @@ -2,7 +2,7 @@ # This software is distributed under the terms of the GNU GPL version 3. import re -from ranger.fsobject import FileSystemObject +from ranger.container.fsobject import FileSystemObject from ranger.core.shared import SettingsAware N_FIRST_BYTES = 256 diff --git a/ranger/fsobject/fsobject.py b/ranger/container/fsobject.py index ce04371c..f03fef7a 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/container/fsobject.py @@ -10,6 +10,8 @@ DOCUMENT_EXTENSIONS = ('cfg', 'css', 'cvs', 'djvu', 'doc', 'docx', 'gnm', DOCUMENT_BASENAMES = ('bugs', 'bugs', 'changelog', 'copying', 'credits', 'hacking', 'help', 'install', 'license', 'readme', 'todo') +BAD_INFO = '?' + import re from os import lstat, stat from os.path import abspath, basename, dirname, realpath, splitext, extsep diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 56c71cdb..2c04f510 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -22,7 +22,7 @@ from ranger.ext.rifle import squash_flags, ASK_COMMAND from ranger.core.shared import FileManagerAware, EnvironmentAware, \ SettingsAware from ranger.core.tab import Tab -from ranger.fsobject import File +from ranger.container.file import File from ranger.core.loader import CommandLoader, CopyLoader from ranger.container.settingobject import ALLOWED_SETTINGS diff --git a/ranger/core/fm.py b/ranger/core/fm.py index 9493b5ae..3f18db87 100644 --- a/ranger/core/fm.py +++ b/ranger/core/fm.py @@ -21,7 +21,7 @@ from ranger.container.bookmarks import Bookmarks from ranger.core.runner import Runner from ranger.ext.get_executables import get_executables from ranger.ext.rifle import Rifle -from ranger.fsobject import Directory +from ranger.container.directory import Directory from ranger.ext.signals import SignalDispatcher from ranger import __version__ from ranger.core.loader import Loader diff --git a/ranger/fsobject/__init__.py b/ranger/fsobject/__init__.py deleted file mode 100644 index 8ef136f9..00000000 --- a/ranger/fsobject/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -"""FileSystemObjects are representation of files and directories""" - -BAD_INFO = '?' - -# So they can be imported from other files more easily: -from .fsobject import FileSystemObject -from .file import File -from .directory import Directory diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 02ad562e..55be3569 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -10,7 +10,6 @@ from time import time from . import Widget from .pager import Pager -from ranger.fsobject import BAD_INFO from ranger.ext.widestring import WideString from ranger.gui.color import * |