k3pattern 0.1.6__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: k3pattern
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Find common prefix of strings, tuples, and nested structures
5
5
  Author-email: Zhang Yanpo <drdr.xp@gmail.com>
6
6
  License-Expression: MIT
@@ -0,0 +1,23 @@
1
+ """
2
+ Find common prefix of several string, tuples of string, or other nested structure, recursively by default.
3
+ It returns the shortest prefix: empty string or empty tuple is removed.
4
+ """
5
+
6
+ from .strutil import (
7
+ common_prefix,
8
+ )
9
+
10
+ __all__ = [
11
+ "common_prefix",
12
+ ]
13
+
14
+
15
+ def __getattr__(name: str) -> str:
16
+ # importlib.metadata takes about 20 ms to import, so it is loaded only
17
+ # when __version__ is read
18
+ if name != "__version__":
19
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
20
+
21
+ from importlib.metadata import version
22
+
23
+ return version("k3pattern")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: k3pattern
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Find common prefix of strings, tuples, and nested structures
5
5
  Author-email: Zhang Yanpo <drdr.xp@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "k3pattern"
7
- version = "0.1.6"
7
+ version = "0.1.7"
8
8
  description = "Find common prefix of strings, tuples, and nested structures"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,16 +0,0 @@
1
- """
2
- Find common prefix of several string, tuples of string, or other nested structure, recursively by default.
3
- It returns the shortest prefix: empty string or empty tuple is removed.
4
- """
5
-
6
- from importlib.metadata import version
7
-
8
- __version__ = version("k3pattern")
9
-
10
- from .strutil import (
11
- common_prefix,
12
- )
13
-
14
- __all__ = [
15
- "common_prefix",
16
- ]
File without changes
File without changes
File without changes
File without changes
File without changes