mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Additional cleanup per mypy
- Add Callable type to hasher (should realy be more specific...) - Add type hint to COLUMNS in qtlib/table.py - Use Qt.ItemFlag.ItemIsEnabled instead of Qt.itemIsEnabled in qtlib/table.py
This commit is contained in:
@@ -6,6 +6,16 @@
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
import typing
|
||||
from os import urandom
|
||||
|
||||
from pathlib import Path
|
||||
from hscommon.testutil import eq_
|
||||
from core.tests.directories_test import create_fake_fs
|
||||
|
||||
from .. import fs
|
||||
|
||||
hasher: typing.Callable
|
||||
try:
|
||||
import xxhash
|
||||
|
||||
@@ -15,14 +25,6 @@ except ImportError:
|
||||
|
||||
hasher = hashlib.md5
|
||||
|
||||
from os import urandom
|
||||
|
||||
from pathlib import Path
|
||||
from hscommon.testutil import eq_
|
||||
from core.tests.directories_test import create_fake_fs
|
||||
|
||||
from .. import fs
|
||||
|
||||
|
||||
def create_fake_fs_with_random_data(rootpath):
|
||||
rootpath = rootpath.joinpath("fs")
|
||||
|
||||
Reference in New Issue
Block a user