summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemato/cli.py6
-rw-r--r--gemato/compression.py2
-rw-r--r--gemato/hash.py2
-rw-r--r--gemato/manifest.py8
-rw-r--r--gemato/openpgp.py4
-rw-r--r--gemato/profile.py2
-rw-r--r--gemato/recursiveloader.py6
-rw-r--r--gemato/util.py4
-rwxr-xr-xutils/fuzzy-hash-tester.py2
9 files changed, 18 insertions, 18 deletions
diff --git a/gemato/cli.py b/gemato/cli.py
index a831344..d3692bb 100644
--- a/gemato/cli.py
+++ b/gemato/cli.py
@@ -33,7 +33,7 @@ def verify_failure(e):
return False
-class GematoCommand(object):
+class GematoCommand:
"""
Base class for commands supported by gemato.
"""
@@ -80,7 +80,7 @@ class GematoCommand(object):
pass
-class BaseOpenPGPMixin(object):
+class BaseOpenPGPMixin:
"""
A base mixin that adds logic to load and use OpenPGP keys.
"""
@@ -157,7 +157,7 @@ class VerifyingOpenPGPMixin(BaseOpenPGPMixin):
logging.info('Keys refreshed.')
-class BaseManifestLoaderMixin(object):
+class BaseManifestLoaderMixin:
"""
Mixin for commands using RecursiveManifestLoader class.
"""
diff --git a/gemato/compression.py b/gemato/compression.py
index 6fd0ef2..a2bc5c1 100644
--- a/gemato/compression.py
+++ b/gemato/compression.py
@@ -37,7 +37,7 @@ def open_compressed_file(suffix, f, mode='rb'):
raise UnsupportedCompression(suffix)
-class FileStack(object):
+class FileStack:
"""
A context manager for stacked files. Maintains handles for all files
on stack, returns the topmost (last) layer on enter and closes them
diff --git a/gemato/hash.py b/gemato/hash.py
index fbb6a8b..8749bfa 100644
--- a/gemato/hash.py
+++ b/gemato/hash.py
@@ -13,7 +13,7 @@ HASH_BUFFER_SIZE = 65536
MAX_SLURP_SIZE = 1048576
-class SizeHash(object):
+class SizeHash:
"""A cheap wrapper to count file size via hashlib-like interface"""
__slots__ = ['size']
diff --git a/gemato/manifest.py b/gemato/manifest.py
index aee035c..56f725f 100644
--- a/gemato/manifest.py
+++ b/gemato/manifest.py
@@ -18,7 +18,7 @@ from gemato.util import (
)
-class ManifestEntryTIMESTAMP(object):
+class ManifestEntryTIMESTAMP:
"""ISO-8601 timestamp"""
__slots__ = ['ts']
@@ -54,7 +54,7 @@ class ManifestEntryTIMESTAMP(object):
or (self.tag == other.tag and self.ts < other.ts))
-class ManifestPathEntry(object):
+class ManifestPathEntry:
"""Base class for entries using a path"""
__slots__ = ['path']
@@ -320,7 +320,7 @@ def new_manifest_entry(tag, *args):
return MANIFEST_TAG_MAPPING[tag](*args)
-class ManifestState(object):
+class ManifestState:
"""
FSM constants for loading Manifest.
"""
@@ -332,7 +332,7 @@ class ManifestState(object):
POST_SIGNED_DATA = 4
-class ManifestFile(object):
+class ManifestFile:
"""
A class encapsulating a single Manifest file. It supports reading
from files and writing to them.
diff --git a/gemato/openpgp.py b/gemato/openpgp.py
index 09525a9..654f4f1 100644
--- a/gemato/openpgp.py
+++ b/gemato/openpgp.py
@@ -37,7 +37,7 @@ GNUPG = os.environ.get('GNUPG', 'gpg')
GNUPGCONF = os.environ.get('GNUPGCONF', 'gpgconf')
-class OpenPGPSignatureData(object):
+class OpenPGPSignatureData:
__slots__ = ['fingerprint', 'timestamp', 'expire_timestamp',
'primary_key_fingerprint']
@@ -49,7 +49,7 @@ class OpenPGPSignatureData(object):
self.primary_key_fingerprint = primary_key_fingerprint
-class OpenPGPSystemEnvironment(object):
+class OpenPGPSystemEnvironment:
"""
OpenPGP environment class that uses the global OpenPGP environment
(user's home directory or GNUPGHOME).
diff --git a/gemato/profile.py b/gemato/profile.py
index 463b72c..0e26a28 100644
--- a/gemato/profile.py
+++ b/gemato/profile.py
@@ -6,7 +6,7 @@
import os.path
-class DefaultProfile(object):
+class DefaultProfile:
"""
Profile is a class describing the specific properties of a directory
tree. It is used when updating Manifests to determine the most
diff --git a/gemato/recursiveloader.py b/gemato/recursiveloader.py
index 530b61d..fd8f571 100644
--- a/gemato/recursiveloader.py
+++ b/gemato/recursiveloader.py
@@ -40,7 +40,7 @@ from gemato.verify import (
)
-class ManifestLoader(object):
+class ManifestLoader:
"""
Helper class to load Manifests in subprocesses.
"""
@@ -99,7 +99,7 @@ class ManifestLoader(object):
return (args[0], self.verify_and_load(*args)[0])
-class SubprocessVerifier(object):
+class SubprocessVerifier:
"""
Helper class used to verify directories in subprocesses.
"""
@@ -168,7 +168,7 @@ class SubprocessVerifier(object):
return ret
-class ManifestRecursiveLoader(object):
+class ManifestRecursiveLoader:
"""
A class encapsulating a tree covered by multiple Manifests.
Automatically verifies and loads additional sub-Manifests,
diff --git a/gemato/util.py b/gemato/util.py
index 94006a6..fa60e45 100644
--- a/gemato/util.py
+++ b/gemato/util.py
@@ -1,10 +1,10 @@
# gemato: Utility functions
# vim:fileencoding=utf-8
-# (c) 2017-2018 Michał Górny
+# (c) 2017-2020 Michał Górny
# Licensed under the terms of 2-clause BSD license
-class MultiprocessingPoolWrapper(object):
+class MultiprocessingPoolWrapper:
"""
A portability wrapper for multiprocessing.Pool that supports
context manager API (and any future hacks we might need).
diff --git a/utils/fuzzy-hash-tester.py b/utils/fuzzy-hash-tester.py
index c3234cb..1988852 100755
--- a/utils/fuzzy-hash-tester.py
+++ b/utils/fuzzy-hash-tester.py
@@ -12,7 +12,7 @@ import sys
import pyblake2
-class ExternalToolHash(object):
+class ExternalToolHash:
def __init__(self, argv):
self.subp = subprocess.Popen(argv,
stdin=subprocess.PIPE,