doc: add REUSE comment header for singleton.py

Comparing our implementation with the one it is based on, they really
don't have much more in common than the general idea of the
implementation, which afaik can't be copyrighted.
This commit is contained in:
Jann Stute
2026-05-11 19:22:12 +02:00
parent 1aa526c454
commit da69a4bad1

View File

@@ -1,10 +1,11 @@
# Based off example from Refactoring Guru:
# https://refactoring.guru/design-patterns/singleton/python/example#example-1
# Adapted for TagStudio: https://github.com/CyanVoxel/TagStudio
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
from threading import Lock
# See also: https://refactoring.guru/design-patterns/singleton/python/example#example-1
class Singleton(type):
"""A thread-safe implementation of a Singleton."""