encommon 0.8.2__tar.gz → 0.9.0__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.
Files changed (73) hide show
  1. {encommon-0.8.2/encommon.egg-info → encommon-0.9.0}/PKG-INFO +1 -1
  2. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/test/test_config.py +14 -6
  3. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/test/test_files.py +14 -8
  4. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/test/test_logger.py +14 -8
  5. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/test/test_paths.py +14 -8
  6. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/test/test_crypts.py +8 -4
  7. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/test/test_hashes.py +8 -4
  8. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/test_duration.py +4 -2
  9. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/test_timers.py +8 -4
  10. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/test_times.py +8 -4
  11. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/test_window.py +8 -4
  12. {encommon-0.8.2 → encommon-0.9.0}/encommon/types/__init__.py +6 -0
  13. encommon-0.9.0/encommon/types/strings.py +110 -0
  14. encommon-0.9.0/encommon/types/test/test_strings.py +61 -0
  15. encommon-0.9.0/encommon/version.txt +1 -0
  16. {encommon-0.8.2 → encommon-0.9.0/encommon.egg-info}/PKG-INFO +1 -1
  17. encommon-0.8.2/encommon/types/strings.py +0 -35
  18. encommon-0.8.2/encommon/types/test/test_strings.py +0 -19
  19. encommon-0.8.2/encommon/version.txt +0 -1
  20. {encommon-0.8.2 → encommon-0.9.0}/LICENSE +0 -0
  21. {encommon-0.8.2 → encommon-0.9.0}/MANIFEST.in +0 -0
  22. {encommon-0.8.2 → encommon-0.9.0}/README.md +0 -0
  23. {encommon-0.8.2 → encommon-0.9.0}/encommon/__init__.py +0 -0
  24. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/__init__.py +0 -0
  25. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/common.py +0 -0
  26. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/config.py +0 -0
  27. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/files.py +0 -0
  28. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/logger.py +0 -0
  29. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/params.py +0 -0
  30. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/paths.py +0 -0
  31. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/test/__init__.py +0 -0
  32. {encommon-0.8.2 → encommon-0.9.0}/encommon/config/test/test_common.py +0 -0
  33. {encommon-0.8.2 → encommon-0.9.0}/encommon/conftest.py +0 -0
  34. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/__init__.py +0 -0
  35. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/crypts.py +0 -0
  36. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/hashes.py +0 -0
  37. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/params.py +0 -0
  38. {encommon-0.8.2 → encommon-0.9.0}/encommon/crypts/test/__init__.py +0 -0
  39. {encommon-0.8.2 → encommon-0.9.0}/encommon/py.typed +0 -0
  40. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/__init__.py +0 -0
  41. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/common.py +0 -0
  42. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/duration.py +0 -0
  43. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/parse.py +0 -0
  44. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/__init__.py +0 -0
  45. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/test_common.py +0 -0
  46. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/test/test_parse.py +0 -0
  47. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/timers.py +0 -0
  48. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/times.py +0 -0
  49. {encommon-0.8.2 → encommon-0.9.0}/encommon/times/window.py +0 -0
  50. {encommon-0.8.2 → encommon-0.9.0}/encommon/types/dicts.py +0 -0
  51. {encommon-0.8.2 → encommon-0.9.0}/encommon/types/empty.py +0 -0
  52. {encommon-0.8.2 → encommon-0.9.0}/encommon/types/test/__init__.py +0 -0
  53. {encommon-0.8.2 → encommon-0.9.0}/encommon/types/test/test_dicts.py +0 -0
  54. {encommon-0.8.2 → encommon-0.9.0}/encommon/types/test/test_empty.py +0 -0
  55. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/__init__.py +0 -0
  56. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/common.py +0 -0
  57. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/match.py +0 -0
  58. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/paths.py +0 -0
  59. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/sample.py +0 -0
  60. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/stdout.py +0 -0
  61. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/test/__init__.py +0 -0
  62. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/test/test_common.py +0 -0
  63. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/test/test_match.py +0 -0
  64. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/test/test_paths.py +0 -0
  65. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/test/test_sample.py +0 -0
  66. {encommon-0.8.2 → encommon-0.9.0}/encommon/utils/test/test_stdout.py +0 -0
  67. {encommon-0.8.2 → encommon-0.9.0}/encommon.egg-info/SOURCES.txt +0 -0
  68. {encommon-0.8.2 → encommon-0.9.0}/encommon.egg-info/dependency_links.txt +0 -0
  69. {encommon-0.8.2 → encommon-0.9.0}/encommon.egg-info/requires.txt +0 -0
  70. {encommon-0.8.2 → encommon-0.9.0}/encommon.egg-info/top_level.txt +0 -0
  71. {encommon-0.8.2 → encommon-0.9.0}/pyproject.toml +0 -0
  72. {encommon-0.8.2 → encommon-0.9.0}/reqs-install.txt +0 -0
  73. {encommon-0.8.2 → encommon-0.9.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.8.2
3
+ Version: 0.9.0
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -16,6 +16,8 @@ from ..params import Params
16
16
  from ... import ENPYRWS
17
17
  from ... import PROJECT
18
18
  from ...crypts import Crypts
19
+ from ...types import inrepr
20
+ from ...types import instr
19
21
  from ...utils import load_sample
20
22
  from ...utils import prep_sample
21
23
 
@@ -48,18 +50,24 @@ def test_Config(
48
50
  '_Config__crypts']
49
51
 
50
52
 
51
- assert 1 <= repr(config).find(
52
- 'config.Config object')
53
+ assert inrepr(
54
+ 'config.Config object',
55
+ config)
53
56
 
54
57
  assert hash(config) > 0
55
58
 
56
- assert 1 <= str(config).find(
57
- 'config.Config object')
59
+ assert instr(
60
+ 'config.Config object',
61
+ config)
58
62
 
59
63
 
60
- assert 'ConfigFiles' in str(config.files)
64
+ assert instr(
65
+ 'files.ConfigFiles object',
66
+ config.files)
61
67
 
62
- assert 'ConfigPaths' in str(config.paths)
68
+ assert instr(
69
+ 'paths.ConfigPaths object',
70
+ config.paths)
63
71
 
64
72
  assert len(config.cargs) == 1
65
73
 
@@ -14,6 +14,8 @@ from pytest import fixture
14
14
  from . import SAMPLES
15
15
  from ..files import ConfigFile
16
16
  from ..files import ConfigFiles
17
+ from ...types import inrepr
18
+ from ...types import instr
17
19
 
18
20
 
19
21
 
@@ -54,13 +56,15 @@ def test_ConfigFile(
54
56
  'config']
55
57
 
56
58
 
57
- assert 1 <= repr(file).find(
58
- 'files.ConfigFile object')
59
+ assert inrepr(
60
+ 'files.ConfigFile object',
61
+ file)
59
62
 
60
63
  assert hash(file) > 0
61
64
 
62
- assert 1 <= str(file).find(
63
- 'files.ConfigFile object')
65
+ assert instr(
66
+ 'files.ConfigFile object',
67
+ file)
64
68
 
65
69
 
66
70
  assert file.path.name == 'config.yml'
@@ -87,13 +91,15 @@ def test_ConfigFiles(
87
91
  '_ConfigFiles__merged']
88
92
 
89
93
 
90
- assert 1 <= repr(files).find(
91
- 'files.ConfigFiles object')
94
+ assert inrepr(
95
+ 'files.ConfigFiles object',
96
+ files)
92
97
 
93
98
  assert hash(files) > 0
94
99
 
95
- assert 1 <= str(files).find(
96
- 'files.ConfigFiles object')
100
+ assert instr(
101
+ 'files.ConfigFiles object',
102
+ files)
97
103
 
98
104
 
99
105
  assert len(files.paths) == 2
@@ -18,6 +18,8 @@ from ..logger import Message
18
18
  from ..params import LoggerParams
19
19
  from ...times.common import UNIXMPOCH
20
20
  from ...times.common import UNIXSPOCH
21
+ from ...types import inrepr
22
+ from ...types import instr
21
23
  from ...utils import strip_ansi
22
24
 
23
25
 
@@ -75,13 +77,15 @@ def test_Message() -> None:
75
77
  '_Message__fields']
76
78
 
77
79
 
78
- assert repr(message)[:20] == (
79
- 'Message(level="info"')
80
+ assert inrepr(
81
+ 'Message(level="info"',
82
+ message)
80
83
 
81
84
  assert hash(message) > 0
82
85
 
83
- assert str(message)[:20] == (
84
- 'Message(level="info"')
86
+ assert instr(
87
+ 'Message(level="info"',
88
+ message)
85
89
 
86
90
 
87
91
  assert message.level == 'info'
@@ -146,13 +150,15 @@ def test_Logger(
146
150
  '_Logger__logr_file']
147
151
 
148
152
 
149
- assert 1 <= repr(logger).find(
150
- 'logger.Logger object')
153
+ assert inrepr(
154
+ 'logger.Logger object',
155
+ logger)
151
156
 
152
157
  assert hash(logger) > 0
153
158
 
154
- assert 1 <= str(logger).find(
155
- 'logger.Logger object')
159
+ assert instr(
160
+ 'logger.Logger object',
161
+ logger)
156
162
 
157
163
 
158
164
  assert logger.stdo_level == 'info'
@@ -16,6 +16,8 @@ from ..paths import ConfigPath
16
16
  from ..paths import ConfigPaths
17
17
  from ... import ENPYRWS
18
18
  from ... import PROJECT
19
+ from ...types import inrepr
20
+ from ...types import instr
19
21
  from ...utils import load_sample
20
22
  from ...utils import prep_sample
21
23
 
@@ -57,13 +59,15 @@ def test_ConfigPath(
57
59
  'config']
58
60
 
59
61
 
60
- assert 1 <= repr(path).find(
61
- 'paths.ConfigPath object')
62
+ assert inrepr(
63
+ 'paths.ConfigPath object',
64
+ path)
62
65
 
63
66
  assert hash(path) > 0
64
67
 
65
- assert 1 <= str(path).find(
66
- 'paths.ConfigPath object')
68
+ assert instr(
69
+ 'paths.ConfigPath object',
70
+ path)
67
71
 
68
72
 
69
73
  assert 'test' in path.path.name
@@ -89,13 +93,15 @@ def test_ConfigPaths(
89
93
  '_ConfigPaths__merged']
90
94
 
91
95
 
92
- assert 1 <= repr(paths).find(
93
- 'paths.ConfigPaths object')
96
+ assert inrepr(
97
+ 'paths.ConfigPaths object',
98
+ paths)
94
99
 
95
100
  assert hash(paths) > 0
96
101
 
97
- assert 1 <= str(paths).find(
98
- 'paths.ConfigPaths object')
102
+ assert instr(
103
+ 'paths.ConfigPaths object',
104
+ paths)
99
105
 
100
106
 
101
107
  assert len(paths.paths) == 2
@@ -13,6 +13,8 @@ from pytest import raises
13
13
 
14
14
  from ..crypts import Crypts
15
15
  from ..params import CryptsParams
16
+ from ...types import inrepr
17
+ from ...types import instr
16
18
 
17
19
 
18
20
 
@@ -51,13 +53,15 @@ def test_Crypts(
51
53
  '_Crypts__phrases']
52
54
 
53
55
 
54
- assert 1 <= repr(crypts).find(
55
- 'crypts.Crypts object')
56
+ assert inrepr(
57
+ 'crypts.Crypts object',
58
+ crypts)
56
59
 
57
60
  assert hash(crypts) > 0
58
61
 
59
- assert 1 <= str(crypts).find(
60
- 'crypts.Crypts object')
62
+ assert instr(
63
+ 'crypts.Crypts object',
64
+ crypts)
61
65
 
62
66
 
63
67
  assert len(crypts.phrases) == 2
@@ -8,6 +8,8 @@ is permitted, for more information consult the project license file.
8
8
 
9
9
 
10
10
  from ..hashes import Hashes
11
+ from ...types import inrepr
12
+ from ...types import instr
11
13
 
12
14
 
13
15
 
@@ -25,13 +27,15 @@ def test_Hashes() -> None:
25
27
  '_Hashes__string']
26
28
 
27
29
 
28
- assert 1 <= repr(hashes).find(
29
- 'hashes.Hashes object')
30
+ assert inrepr(
31
+ 'hashes.Hashes object',
32
+ hashes)
30
33
 
31
34
  assert hash(hashes) > 0
32
35
 
33
- assert 1 <= str(hashes).find(
34
- 'hashes.Hashes object')
36
+ assert instr(
37
+ 'hashes.Hashes object',
38
+ hashes)
35
39
 
36
40
 
37
41
  assert hashes.string == 'string'
@@ -8,6 +8,7 @@ is permitted, for more information consult the project license file.
8
8
 
9
9
 
10
10
  from ..duration import Duration
11
+ from ...types import inrepr
11
12
  from ...types.strings import COMMAS
12
13
 
13
14
 
@@ -28,8 +29,9 @@ def test_Duration() -> None:
28
29
  '_Duration__groups']
29
30
 
30
31
 
31
- assert repr(durate)[:23] == (
32
- 'Duration(seconds=95401.')
32
+ assert inrepr(
33
+ 'Duration(seconds=95401',
34
+ durate)
33
35
 
34
36
  assert hash(durate) > 0
35
37
 
@@ -14,6 +14,8 @@ from pytest import fixture
14
14
  from pytest import raises
15
15
 
16
16
  from ..timers import Timers
17
+ from ...types import inrepr
18
+ from ...types import instr
17
19
 
18
20
 
19
21
 
@@ -54,13 +56,15 @@ def test_Timers(
54
56
  '_Timers__cache']
55
57
 
56
58
 
57
- assert 1 <= repr(timers).find(
58
- 'timers.Timers object')
59
+ assert inrepr(
60
+ 'timers.Timers object',
61
+ timers)
59
62
 
60
63
  assert hash(timers) > 0
61
64
 
62
- assert 1 <= str(timers).find(
63
- 'timers.Timers object')
65
+ assert instr(
66
+ 'timers.Timers object',
67
+ timers)
64
68
 
65
69
 
66
70
  assert timers.timers == {'one': 1}
@@ -12,6 +12,8 @@ from ..common import UNIXEPOCH
12
12
  from ..common import UNIXHPOCH
13
13
  from ..common import UNIXMPOCH
14
14
  from ..times import Times
15
+ from ...types import inrepr
16
+ from ...types import instr
15
17
 
16
18
 
17
19
 
@@ -32,13 +34,15 @@ def test_Times() -> None:
32
34
  '_Times__hashed']
33
35
 
34
36
 
35
- assert repr(times)[:23] == (
36
- "Times('1970-01-01T00:00")
37
+ assert inrepr(
38
+ "Times('1970-01-01T00:00",
39
+ times)
37
40
 
38
41
  assert hash(times) > 0
39
42
 
40
- assert str(times)[:23] == (
41
- '1970-01-01T00:00:00.000')
43
+ assert instr(
44
+ '1970-01-01T00:00:00.000',
45
+ times)
42
46
 
43
47
 
44
48
  assert int(times) == 0
@@ -15,6 +15,8 @@ from pytest import mark
15
15
  from ..window import Window
16
16
  from ..window import window_croniter
17
17
  from ..window import window_interval
18
+ from ...types import inrepr
19
+ from ...types import instr
18
20
 
19
21
  if TYPE_CHECKING:
20
22
  from ..common import PARSABLE
@@ -58,13 +60,15 @@ def test_Window(
58
60
  '_Window__walked']
59
61
 
60
62
 
61
- assert 1 <= repr(window).find(
62
- 'window.Window object')
63
+ assert inrepr(
64
+ 'window.Window object',
65
+ window)
63
66
 
64
67
  assert hash(window) > 0
65
68
 
66
- assert 1 <= str(window).find(
67
- 'window.Window object')
69
+ assert instr(
70
+ 'window.Window object',
71
+ window)
68
72
 
69
73
 
70
74
  assert window.schedule == '* * * * *'
@@ -10,12 +10,18 @@ is permitted, for more information consult the project license file.
10
10
  from .dicts import merge_dicts
11
11
  from .dicts import sort_dict
12
12
  from .empty import Empty
13
+ from .strings import hasstr
14
+ from .strings import inrepr
15
+ from .strings import instr
13
16
  from .strings import striplower
14
17
 
15
18
 
16
19
 
17
20
  __all__ = [
18
21
  'Empty',
22
+ 'hasstr',
23
+ 'inrepr',
24
+ 'instr',
19
25
  'merge_dicts',
20
26
  'sort_dict',
21
27
  'striplower']
@@ -0,0 +1,110 @@
1
+ """
2
+ Functions and routines associated with Enasis Network Common Library.
3
+
4
+ This file is part of Enasis Network software eco-system. Distribution
5
+ is permitted, for more information consult the project license file.
6
+ """
7
+
8
+
9
+
10
+ from typing import Any
11
+
12
+
13
+
14
+ COMMAS = ', '
15
+ COMMAD = ','
16
+
17
+ NEWLINE = '\n'
18
+
19
+ SEMPTY = ''
20
+ SPACED = ' '
21
+
22
+
23
+
24
+ def striplower(
25
+ value: str,
26
+ ) -> str:
27
+ """
28
+ Return the provided string but stripped and lower cased.
29
+
30
+ Example
31
+ -------
32
+ >>> striplower(' Foo ')
33
+ 'foo'
34
+
35
+ :param value: String which will be stripped and lowered.
36
+ :returns: Provided string but stripped and lower cased.
37
+ """
38
+
39
+ return value.strip().lower()
40
+
41
+
42
+
43
+ def hasstr(
44
+ haystack: str,
45
+ needle: str,
46
+ ) -> bool:
47
+ """
48
+ Return the boolean indicating if needle is in haystack.
49
+
50
+ Example
51
+ -------
52
+ >>> haystack = 'barfoobaz'
53
+ >>> needle = 'foo'
54
+ >>> hasstr(haystack, needle)
55
+ True
56
+
57
+ :param haystack: Full string which may contain needle.
58
+ :param needle: Substring which may be within haystack.
59
+ :returns: Boolean indicating if needle is in haystack.
60
+ """
61
+
62
+ return needle in haystack
63
+
64
+
65
+
66
+ def inrepr(
67
+ needle: str,
68
+ haystack: Any, # noqa: ANN401
69
+ ) -> bool:
70
+ """
71
+ Return the boolean indicating if needle is in haystack.
72
+
73
+ Example
74
+ -------
75
+ >>> class MyClass: pass
76
+ >>> haystack = MyClass()
77
+ >>> needle = 'MyClass'
78
+ >>> inrepr(needle, haystack)
79
+ True
80
+
81
+ :param needle: Substring which may be within haystack.
82
+ :param haystack: Object which is inspected for needle.
83
+ :returns: Boolean indicating if needle is in haystack.
84
+ """
85
+
86
+ return hasstr(repr(haystack), needle)
87
+
88
+
89
+
90
+ def instr(
91
+ needle: str,
92
+ haystack: Any, # noqa: ANN401
93
+ ) -> bool:
94
+ """
95
+ Return the boolean indicating if needle is in haystack.
96
+
97
+ Example
98
+ -------
99
+ >>> class MyClass: pass
100
+ >>> haystack = MyClass()
101
+ >>> needle = 'MyClass'
102
+ >>> instr(needle, haystack)
103
+ True
104
+
105
+ :param needle: Substring which may be within haystack.
106
+ :param haystack: Object which is inspected for needle.
107
+ :returns: Boolean indicating if needle is in haystack.
108
+ """
109
+
110
+ return hasstr(str(haystack), needle)
@@ -0,0 +1,61 @@
1
+ """
2
+ Functions and routines associated with Enasis Network Common Library.
3
+
4
+ This file is part of Enasis Network software eco-system. Distribution
5
+ is permitted, for more information consult the project license file.
6
+ """
7
+
8
+
9
+
10
+ from ..strings import hasstr
11
+ from ..strings import inrepr
12
+ from ..strings import instr
13
+ from ..strings import striplower
14
+
15
+
16
+
17
+ def test_striplower() -> None:
18
+ """
19
+ Perform various tests associated with relevant routines.
20
+ """
21
+
22
+ assert striplower(' Foo ') == 'foo'
23
+
24
+
25
+
26
+ def test_hasstr() -> None:
27
+ """
28
+ Perform various tests associated with relevant routines.
29
+ """
30
+
31
+ assert hasstr('abc', 'a')
32
+ assert hasstr('abc', 'b')
33
+ assert hasstr('abc', 'c')
34
+
35
+
36
+
37
+ def test_inrepr() -> None:
38
+ """
39
+ Perform various tests associated with relevant routines.
40
+ """
41
+
42
+ class MyClass:
43
+ pass
44
+
45
+ item = MyClass()
46
+
47
+ assert inrepr('MyClass', item)
48
+
49
+
50
+
51
+ def test_instr() -> None:
52
+ """
53
+ Perform various tests associated with relevant routines.
54
+ """
55
+
56
+ class MyClass:
57
+ pass
58
+
59
+ item = MyClass()
60
+
61
+ assert instr('MyClass', item)
@@ -0,0 +1 @@
1
+ 0.9.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.8.2
3
+ Version: 0.9.0
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,35 +0,0 @@
1
- """
2
- Functions and routines associated with Enasis Network Common Library.
3
-
4
- This file is part of Enasis Network software eco-system. Distribution
5
- is permitted, for more information consult the project license file.
6
- """
7
-
8
-
9
-
10
- COMMAS = ', '
11
- COMMAD = ','
12
-
13
- NEWLINE = '\n'
14
-
15
- SEMPTY = ''
16
- SPACED = ' '
17
-
18
-
19
-
20
- def striplower(
21
- value: str,
22
- ) -> str:
23
- """
24
- Return the provided string but stripped and lower cased.
25
-
26
- Example
27
- -------
28
- >>> striplower(' Foo ')
29
- 'foo'
30
-
31
- :param value: String which will be stripped and lowered.
32
- :returns: Provided string but stripped and lower cased.
33
- """
34
-
35
- return value.strip().lower()
@@ -1,19 +0,0 @@
1
- """
2
- Functions and routines associated with Enasis Network Common Library.
3
-
4
- This file is part of Enasis Network software eco-system. Distribution
5
- is permitted, for more information consult the project license file.
6
- """
7
-
8
-
9
-
10
- from ..strings import striplower
11
-
12
-
13
-
14
- def test_striplower() -> None:
15
- """
16
- Perform various tests associated with relevant routines.
17
- """
18
-
19
- assert striplower(' Foo ') == 'foo'
@@ -1 +0,0 @@
1
- 0.8.2
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes