encommon 0.16.0__tar.gz → 0.17.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {encommon-0.16.0/encommon.egg-info → encommon-0.17.0}/PKG-INFO +1 -1
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_timer.py +5 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_timers.py +4 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/timer.py +14 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/timers.py +17 -0
- encommon-0.17.0/encommon/version.txt +1 -0
- {encommon-0.16.0 → encommon-0.17.0/encommon.egg-info}/PKG-INFO +1 -1
- encommon-0.16.0/encommon/version.txt +0 -1
- {encommon-0.16.0 → encommon-0.17.0}/LICENSE +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/MANIFEST.in +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/README.md +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/colors/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/colors/color.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/colors/test/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/colors/test/test_color.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/config.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/files.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/logger.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/params.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/paths.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/test/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/test/test_config.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/test/test_files.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/test/test_logger.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/test/test_paths.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/test/test_utils.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/config/utils.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/conftest.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/crypts.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/hashes.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/params.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/test/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/test/test_crypts.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/crypts/test/test_hashes.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/py.typed +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/common.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/duration.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/params.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/parse.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_duration.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_params.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_parse.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_time.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_unitime.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_utils.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_window.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/test/test_windows.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/time.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/unitime.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/utils.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/window.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/times/windows.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/classes.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/dicts.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/empty.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/lists.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/notate.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/strings.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/test_classes.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/test_dicts.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/test_empty.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/test_lists.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/test_notate.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/test/test_strings.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/types/types.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/common.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/files.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/match.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/paths.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/sample.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/stdout.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/test/__init__.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/test/test_files.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/test/test_match.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/test/test_paths.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/test/test_sample.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon/utils/test/test_stdout.py +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon.egg-info/SOURCES.txt +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon.egg-info/dependency_links.txt +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon.egg-info/requires.txt +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/encommon.egg-info/top_level.txt +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/pyproject.toml +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/reqs-install.txt +0 -0
- {encommon-0.16.0 → encommon-0.17.0}/setup.cfg +0 -0
@@ -68,6 +68,7 @@ def test_Timer(
|
|
68
68
|
assert timer.remains <= 1
|
69
69
|
|
70
70
|
assert not timer.ready()
|
71
|
+
assert timer.pause()
|
71
72
|
|
72
73
|
|
73
74
|
sleep(1)
|
@@ -77,11 +78,15 @@ def test_Timer(
|
|
77
78
|
assert timer.remains == 0
|
78
79
|
|
79
80
|
assert timer.ready()
|
81
|
+
assert timer.pause()
|
80
82
|
|
81
83
|
assert not timer.ready()
|
84
|
+
assert timer.pause()
|
82
85
|
|
83
86
|
timer.update('1980-01-01')
|
84
87
|
|
85
88
|
assert timer.ready()
|
89
|
+
assert timer.pause()
|
86
90
|
|
87
91
|
assert not timer.ready()
|
92
|
+
assert timer.pause()
|
@@ -151,10 +151,12 @@ def test_Timers_cover(
|
|
151
151
|
|
152
152
|
|
153
153
|
assert timers.ready('two')
|
154
|
+
assert timers.pause('two')
|
154
155
|
|
155
156
|
timers.update('two', 'now')
|
156
157
|
|
157
158
|
assert not timers.ready('two')
|
159
|
+
assert timers.pause('two')
|
158
160
|
|
159
161
|
|
160
162
|
timers = Timers()
|
@@ -165,10 +167,12 @@ def test_Timers_cover(
|
|
165
167
|
timers.create('fur', params)
|
166
168
|
|
167
169
|
assert not timers.ready('fur')
|
170
|
+
assert timers.pause('fur')
|
168
171
|
|
169
172
|
sleep(1)
|
170
173
|
|
171
174
|
assert timers.ready('fur')
|
175
|
+
assert timers.pause('fur')
|
172
176
|
|
173
177
|
timers.delete('fur')
|
174
178
|
|
@@ -131,6 +131,20 @@ class Timer:
|
|
131
131
|
return True
|
132
132
|
|
133
133
|
|
134
|
+
def pause(
|
135
|
+
self,
|
136
|
+
update: bool = True,
|
137
|
+
) -> bool:
|
138
|
+
"""
|
139
|
+
Determine whether or not the appropriate time has passed.
|
140
|
+
|
141
|
+
:param update: Determines whether or not time is updated.
|
142
|
+
:returns: Boolean indicating whether enough time passed.
|
143
|
+
"""
|
144
|
+
|
145
|
+
return not self.ready(update)
|
146
|
+
|
147
|
+
|
134
148
|
def update(
|
135
149
|
self,
|
136
150
|
value: Optional[PARSABLE] = None,
|
@@ -365,6 +365,23 @@ class Timers:
|
|
365
365
|
return ready
|
366
366
|
|
367
367
|
|
368
|
+
def pause(
|
369
|
+
self,
|
370
|
+
unique: str,
|
371
|
+
update: bool = True,
|
372
|
+
) -> bool:
|
373
|
+
"""
|
374
|
+
Determine whether or not the appropriate time has passed.
|
375
|
+
|
376
|
+
:param unique: Unique identifier for the related child.
|
377
|
+
:param update: Determines whether or not time is updated.
|
378
|
+
:returns: Boolean indicating whether enough time passed.
|
379
|
+
"""
|
380
|
+
|
381
|
+
return not self.ready(
|
382
|
+
unique, update)
|
383
|
+
|
384
|
+
|
368
385
|
def create(
|
369
386
|
self,
|
370
387
|
unique: str,
|
@@ -0,0 +1 @@
|
|
1
|
+
0.17.0
|
@@ -1 +0,0 @@
|
|
1
|
-
0.16.0
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|