From 532df2c5b57c7517dfb3dddd8c1358fbadf8baf3 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Fri, 25 Mar 2022 09:41:31 -0700 Subject: Since this thing is on the innerwebs I suppose it should have a copyright... --- collect/bidict.py | 4 ++++ collect/bst.py | 4 ++++ collect/shared_dict.py | 5 +---- collect/trie.py | 8 ++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) (limited to 'collect') diff --git a/collect/bidict.py b/collect/bidict.py index d288174..375721e 100644 --- a/collect/bidict.py +++ b/collect/bidict.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +# © Copyright 2021-2022, Scott Gasch + +"""Bidirectional Dictionary.""" + class BiDict(dict): def __init__(self, *args, **kwargs): diff --git a/collect/bst.py b/collect/bst.py index 712683e..d394194 100644 --- a/collect/bst.py +++ b/collect/bst.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +# © Copyright 2021-2022, Scott Gasch + +"""Binary search tree.""" + from typing import Any, Generator, List, Optional diff --git a/collect/shared_dict.py b/collect/shared_dict.py index f4ec914..3207927 100644 --- a/collect/shared_dict.py +++ b/collect/shared_dict.py @@ -4,7 +4,7 @@ The MIT License (MIT) Copyright (c) 2020 LuizaLabs -Additions Copyright (c) 2022 Scott Gasch +Additions/Modifications Copyright (c) 2022 Scott Gasch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,6 @@ This class is based on https://github.com/luizalabs/shared-memory-dict import pickle from contextlib import contextmanager -from functools import wraps from multiprocessing import RLock, shared_memory from typing import ( Any, @@ -42,8 +41,6 @@ from typing import ( ValuesView, ) -from decorator_utils import synchronized - class PickleSerializer: def dumps(self, obj: dict) -> bytes: diff --git a/collect/trie.py b/collect/trie.py index fef28cb..547d67a 100644 --- a/collect/trie.py +++ b/collect/trie.py @@ -1,9 +1,13 @@ #!/usr/bin/env python3 +# © Copyright 2021-2022, Scott Gasch + """This is a Trie class, see: https://en.wikipedia.org/wiki/Trie. - It attempts to follow Pythonic container patterns. See doctests - for examples.""" +It attempts to follow Pythonic container patterns. See doctests +for examples. + +""" from typing import Any, Generator, Sequence -- cgit v1.3