Debian Codegraph @

src/lazr/delegates/__init__.py

raw symbols SCIP
1 # Copyright 2008-2015 Canonical Ltd. All rights reserved.
2 #
3 # This file is part of lazr.delegates.
4 #
5 # lazr.delegates is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation, version 3 of the License.
8 #
9 # lazr.delegates is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 # License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
16
17 """Decorator helpers that simplify class composition."""
18
19 __all__ = [
20 "Passthrough",
21 "delegate_to",
22 ]
23
24 try:
25 import importlib.metadata as importlib_metadata
26 except ImportError: # pragma: no cover
27 import importlib_metadata
28
29 from lazr.delegates._delegates import (
30 Passthrough,
31 delegate_to,
32 )
33
34 try:
35 __version__ = importlib_metadata.version("lazr.delegates")
36 except importlib_metadata.PackageNotFoundError: # pragma: no cover
37 __version__ = importlib_metadata.version("lazr-delegates")