1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 05:34:36 +00:00

Changed references to what has already been moved from hsutil to hscommon (io, path, testutil).

This commit is contained in:
Virgil Dupras 2011-01-11 11:59:53 +01:00
parent e0cc8ecda2
commit 33c0ba808c
16 changed files with 27 additions and 31 deletions

View File

@ -13,10 +13,11 @@ import subprocess
import re import re
from send2trash import send2trash from send2trash import send2trash
from hscommon import io
from hscommon.reg import RegistrableApplication from hscommon.reg import RegistrableApplication
from hscommon.notify import Broadcaster from hscommon.notify import Broadcaster
from hsutil import io, files from hscommon.path import Path
from hsutil.path import Path from hsutil import files
from hsutil.misc import flatten, first from hsutil.misc import flatten, first
from hsutil.str import escape from hsutil.str import escape

View File

@ -8,9 +8,9 @@
from xml.etree import ElementTree as ET from xml.etree import ElementTree as ET
from hsutil import io from hscommon import io
from hscommon.path import Path
from hsutil.files import FileOrPath from hsutil.files import FileOrPath
from hsutil.path import Path
from . import fs from . import fs

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Created By: Virgil Dupras # Created By: Virgil Dupras
# Created On: 2009-10-22 # Created On: 2009-10-22
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net) # Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
@ -12,12 +11,10 @@
# resulting needless complexity and memory usage. It's been a while since I wanted to do that fork, # resulting needless complexity and memory usage. It's been a while since I wanted to do that fork,
# and I'm doing it now. # and I'm doing it now.
import hashlib import hashlib
import logging import logging
from hsutil import io from hscommon import io
from hsutil.misc import nonone, flatten from hsutil.misc import nonone, flatten
from hsutil.str import get_file_ext from hsutil.str import get_file_ext
@ -52,7 +49,7 @@ class OperationError(FSError):
operation shows that it didn't work.""" operation shows that it didn't work."""
cls_message = "Operation on '{name}' failed." cls_message = "Operation on '{name}' failed."
class File(object): class File:
INITIAL_INFO = { INITIAL_INFO = {
'size': 0, 'size': 0,
'mtime': 0, 'mtime': 0,

View File

@ -10,7 +10,7 @@ import logging
import re import re
from jobprogress import job from jobprogress import job
from hsutil import io from hscommon import io
from hsutil.misc import dedupe from hsutil.misc import dedupe
from hsutil.str import get_file_ext, rem_file_ext from hsutil.str import get_file_ext, rem_file_ext
@ -37,7 +37,7 @@ def is_same_with_digit(name, refname):
end = name[len(refname):].strip() end = name[len(refname):].strip()
return RE_DIGIT_ENDING.match(end) is not None return RE_DIGIT_ENDING.match(end) is not None
class Scanner(object): class Scanner:
def __init__(self): def __init__(self):
self.ignore_list = IgnoreList() self.ignore_list = IgnoreList()
self.discarded_file_count = 0 self.discarded_file_count = 0

View File

@ -11,8 +11,8 @@ import os.path as op
import logging import logging
from pytest import mark from pytest import mark
from hsutil import io from hscommon import io
from hsutil.path import Path from hscommon.path import Path
from hsutil.decorators import log_calls from hsutil.decorators import log_calls
import hsutil.files import hsutil.files
from hscommon.testutil import CallLogger, eq_ from hscommon.testutil import CallLogger, eq_

View File

@ -12,8 +12,8 @@ import tempfile
import shutil import shutil
from pytest import raises from pytest import raises
from hsutil import io from hscommon import io
from hsutil.path import Path from hscommon.path import Path
from hscommon.testutil import eq_ from hscommon.testutil import eq_
from ..directories import * from ..directories import *

View File

@ -11,7 +11,7 @@ import sys
from jobprogress import job from jobprogress import job
from hsutil.decorators import log_calls from hsutil.decorators import log_calls
from hsutil.misc import first from hsutil.misc import first
from hsutil.testutil import eq_ from hscommon.testutil import eq_
from .. import engine from .. import engine
from ..engine import * from ..engine import *

View File

@ -9,7 +9,7 @@
import io import io
from xml.etree import ElementTree as ET from xml.etree import ElementTree as ET
from hsutil.testutil import eq_ from hscommon.testutil import eq_
from ..ignore import * from ..ignore import *

View File

@ -12,7 +12,7 @@ import os.path as op
from xml.etree import ElementTree as ET from xml.etree import ElementTree as ET
from hsutil.path import Path from hscommon.path import Path
from hscommon.testutil import eq_ from hscommon.testutil import eq_
from hsutil.misc import first from hsutil.misc import first

View File

@ -7,8 +7,8 @@
# http://www.hardcoded.net/licenses/bsd_license # http://www.hardcoded.net/licenses/bsd_license
from jobprogress import job from jobprogress import job
from hsutil import io from hscommon import io
from hsutil.path import Path from hscommon.path import Path
from hscommon.testutil import eq_ from hscommon.testutil import eq_
from .. import fs from .. import fs

View File

@ -7,8 +7,8 @@
# which should be included with this package. The terms are also available at # which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license # http://www.hardcoded.net/licenses/bsd_license
from hsutil import io from hscommon import io
from hsutil.path import Path from hscommon.path import Path
from core.engine import getwords from core.engine import getwords
from ..scanner import * from ..scanner import *

View File

@ -13,9 +13,9 @@ import re
from appscript import app, k, CommandError, ApplicationNotFoundError from appscript import app, k, CommandError, ApplicationNotFoundError
from hsutil import io from hscommon import io
from hsutil.str import get_file_ext, remove_invalid_xml from hsutil.str import get_file_ext, remove_invalid_xml
from hsutil.path import Path from hscommon.path import Path
from hscommon.cocoa import as_fetch from hscommon.cocoa import as_fetch
from hscommon.cocoa.objcmin import NSUserDefaults, NSURL from hscommon.cocoa.objcmin import NSUserDefaults, NSURL

View File

@ -8,7 +8,7 @@
# The commented out tests are tests for function that have been converted to pure C for speed # The commented out tests are tests for function that have been converted to pure C for speed
from pytest import raises, skip from pytest import raises, skip
from hsutil.testutil import eq_ from hscommon.testutil import eq_
try: try:
from ..block import * from ..block import *

View File

@ -9,7 +9,7 @@
import logging import logging
from pytest import raises, skip from pytest import raises, skip
from hsutil.testutil import eq_ from hscommon.testutil import eq_
try: try:
from ..cache import Cache, colors_to_string, string_to_colors from ..cache import Cache, colors_to_string, string_to_colors

View File

@ -6,12 +6,10 @@
# which should be included with this package. The terms are also available at # which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license # http://www.hardcoded.net/licenses/bsd_license
import logging import logging
from hsutil import io from hscommon import io
from hsutil.path import Path from hscommon.path import Path
from hscommon.cocoa.objcmin import NSWorkspace from hscommon.cocoa.objcmin import NSWorkspace
from core import fs from core import fs

View File

@ -9,7 +9,7 @@
import hashlib import hashlib
from hsutil import io from hscommon import io
from hsutil.misc import nonone from hsutil.misc import nonone
from core import fs from core import fs