aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-01-26 11:03:13 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-01-26 11:03:13 +0200
commit21b0291a014d17bc4681ae66b0d900c96279fc53 (patch)
tree318c09ca9ab005c2e1ed0a7b6f965e10a6878e08 /src
parentauthors: Add myself to the list. (diff)
downloadsnakeoil-21b0291a014d17bc4681ae66b0d900c96279fc53.tar.gz
snakeoil-21b0291a014d17bc4681ae66b0d900c96279fc53.tar.bz2
snakeoil-21b0291a014d17bc4681ae66b0d900c96279fc53.zip
reformat with black 24
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/snakeoil/constraints.py6
-rw-r--r--src/snakeoil/containers.py3
-rw-r--r--src/snakeoil/data_source.py3
-rw-r--r--src/snakeoil/demandload.py1
-rw-r--r--src/snakeoil/fileutils.py1
-rw-r--r--src/snakeoil/obj.py1
-rw-r--r--src/snakeoil/osutils/native_readdir.py1
-rw-r--r--src/snakeoil/stringio.py6
-rw-r--r--src/snakeoil/struct_compat.py1
-rw-r--r--src/snakeoil/tar.py1
10 files changed, 5 insertions, 19 deletions
diff --git a/src/snakeoil/constraints.py b/src/snakeoil/constraints.py
index c239727..5fe46ec 100644
--- a/src/snakeoil/constraints.py
+++ b/src/snakeoil/constraints.py
@@ -80,9 +80,9 @@ class Problem:
def __init__(self):
self.variables: dict[str, _Domain] = {}
self.constraints: list[tuple[Constraint, frozenset[str]]] = []
- self.vconstraints: dict[
- str, list[tuple[Constraint, frozenset[str]]]
- ] = defaultdict(list)
+ self.vconstraints: dict[str, list[tuple[Constraint, frozenset[str]]]] = (
+ defaultdict(list)
+ )
def add_variable(self, domain: Iterable[Any], *variables: str):
"""Add variables to the problem, which use the specified domain.
diff --git a/src/snakeoil/containers.py b/src/snakeoil/containers.py
index ebfc1b3..ee14baf 100644
--- a/src/snakeoil/containers.py
+++ b/src/snakeoil/containers.py
@@ -18,7 +18,6 @@ from .klass import steal_docs
class InvertedContains(set):
-
"""Set that inverts all contains lookup results.
Essentially, it's a set class usable for blacklist containment testing.
@@ -97,7 +96,6 @@ class SetMixin:
class LimitedChangeSet(SetMixin):
-
"""
Set used to limit the number of times a key can be removed/added.
@@ -263,7 +261,6 @@ class ProtectedSet(SetMixin):
class RefCountingSet(dict):
-
"""
Set implementation that implements refcounting for add/remove, removing the key only when its refcount is 0.
diff --git a/src/snakeoil/data_source.py b/src/snakeoil/data_source.py
index 3b0ccb1..bb265d9 100644
--- a/src/snakeoil/data_source.py
+++ b/src/snakeoil/data_source.py
@@ -190,7 +190,6 @@ class base:
class local_source(base):
-
"""locally accessible data source
Literally a file on disk.
@@ -289,7 +288,6 @@ class bz2_source(base):
class data_source(base):
-
"""
base class encapsulating a purely virtual data source lacking an on disk location.
@@ -389,7 +387,6 @@ class bytes_data_source(data_source):
class invokable_data_source(data_source):
-
"""
data source that takes a callable instead of the actual data item
diff --git a/src/snakeoil/demandload.py b/src/snakeoil/demandload.py
index bfa6dce..1fc6b63 100644
--- a/src/snakeoil/demandload.py
+++ b/src/snakeoil/demandload.py
@@ -131,7 +131,6 @@ else:
class Placeholder:
-
"""Object that knows how to replace itself when first accessed.
See the module docstring for common problems with its use.
diff --git a/src/snakeoil/fileutils.py b/src/snakeoil/fileutils.py
index 02355a8..fdd0f23 100644
--- a/src/snakeoil/fileutils.py
+++ b/src/snakeoil/fileutils.py
@@ -52,7 +52,6 @@ def mmap_or_open_for_read(path: str):
class AtomicWriteFile_mixin:
-
"""File class that stores the changes in a tempfile.
Upon invocation of the close method, this class will use
diff --git a/src/snakeoil/obj.py b/src/snakeoil/obj.py
index a8598bf..6239b20 100644
--- a/src/snakeoil/obj.py
+++ b/src/snakeoil/obj.py
@@ -73,7 +73,6 @@ If that doesn't make sense to the reader, it's probably best that the reader not
try to proxy builtin objects like tuples, lists, dicts, sets, etc.
"""
-
__all__ = ("DelayedInstantiation", "DelayedInstantiation_kls", "make_kls", "popattr")
from . import klass
diff --git a/src/snakeoil/osutils/native_readdir.py b/src/snakeoil/osutils/native_readdir.py
index 6600a71..d13e1ae 100644
--- a/src/snakeoil/osutils/native_readdir.py
+++ b/src/snakeoil/osutils/native_readdir.py
@@ -1,6 +1,5 @@
"""Wrapper for readdir which grabs file type from d_type."""
-
import errno
import os
from stat import (
diff --git a/src/snakeoil/stringio.py b/src/snakeoil/stringio.py
index 1a392eb..339ec97 100644
--- a/src/snakeoil/stringio.py
+++ b/src/snakeoil/stringio.py
@@ -44,9 +44,7 @@ class _make_ro_cls(type):
return x
-class text_readonly(io.StringIO, metaclass=_make_ro_cls):
- ...
+class text_readonly(io.StringIO, metaclass=_make_ro_cls): ...
-class bytes_readonly(io.BytesIO, metaclass=_make_ro_cls):
- ...
+class bytes_readonly(io.BytesIO, metaclass=_make_ro_cls): ...
diff --git a/src/snakeoil/struct_compat.py b/src/snakeoil/struct_compat.py
index 4ad5615..66c1290 100644
--- a/src/snakeoil/struct_compat.py
+++ b/src/snakeoil/struct_compat.py
@@ -17,7 +17,6 @@ base_struct = Struct
# pylint: disable=function-redefined
class Struct(base_struct):
-
"""
Struct extension class adding `read` and `write` methods for handling files
"""
diff --git a/src/snakeoil/tar.py b/src/snakeoil/tar.py
index 6f74ef2..9cae35b 100644
--- a/src/snakeoil/tar.py
+++ b/src/snakeoil/tar.py
@@ -27,7 +27,6 @@ del t
class TarInfo(tarfile.TarInfo):
-
"""
Customized TarInfo implementation.