reykit 1.1.4__py3-none-any.whl → 1.1.7__py3-none-any.whl
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.
- reykit/rdata.py +6 -9
- reykit/rlog.py +1 -23
- reykit/ros.py +1 -7
- reykit/rsystem.py +4 -2
- reykit/rtime.py +6 -21
- reykit/rtype.py +5 -1
- {reykit-1.1.4.dist-info → reykit-1.1.7.dist-info}/METADATA +1 -1
- {reykit-1.1.4.dist-info → reykit-1.1.7.dist-info}/RECORD +10 -10
- {reykit-1.1.4.dist-info → reykit-1.1.7.dist-info}/WHEEL +0 -0
- {reykit-1.1.4.dist-info → reykit-1.1.7.dist-info}/licenses/LICENSE +0 -0
reykit/rdata.py
CHANGED
@@ -9,11 +9,12 @@
|
|
9
9
|
"""
|
10
10
|
|
11
11
|
|
12
|
-
from typing import Any, TypedDict, Literal,
|
12
|
+
from typing import Any, TypedDict, Literal, overload
|
13
13
|
from collections.abc import Callable, Iterable, Generator
|
14
14
|
|
15
15
|
from .rexception import check_least_one, check_most_one
|
16
16
|
from .rsystem import is_iterable
|
17
|
+
from .rtype import AnyValue
|
17
18
|
|
18
19
|
|
19
20
|
__all__ = (
|
@@ -28,7 +29,6 @@ __all__ = (
|
|
28
29
|
|
29
30
|
|
30
31
|
CountResult = TypedDict('CountResult', {'value': Any, 'count': int})
|
31
|
-
Element = TypeVar('Element')
|
32
32
|
|
33
33
|
|
34
34
|
def count(
|
@@ -130,15 +130,12 @@ def flatten(data: Any, *, _flattern_data: list | None = None) -> list:
|
|
130
130
|
|
131
131
|
|
132
132
|
@overload
|
133
|
-
def split(data: Iterable[
|
133
|
+
def split(data: Iterable[AnyValue], share: int = None, bin_size: None = None) -> list[list[AnyValue]]: ...
|
134
134
|
|
135
135
|
@overload
|
136
|
-
def split(data: Iterable[
|
136
|
+
def split(data: Iterable[AnyValue], share: None = None, bin_size: int = None) -> list[list[AnyValue]]: ...
|
137
137
|
|
138
|
-
|
139
|
-
def split(data: Iterable[Element], share: int | None = None, bin_size: int | None = None) -> list[list[Element]]: ...
|
140
|
-
|
141
|
-
def split(data: Iterable[Element], share: int | None = None, bin_size: int | None = None) -> list[list[Element]]:
|
138
|
+
def split(data: Iterable[AnyValue], share: int | None = None, bin_size: int | None = None) -> list[list[AnyValue]]:
|
142
139
|
"""
|
143
140
|
Split data into multiple data.
|
144
141
|
|
@@ -186,7 +183,7 @@ def split(data: Iterable[Element], share: int | None = None, bin_size: int | Non
|
|
186
183
|
return _data
|
187
184
|
|
188
185
|
|
189
|
-
def unique(data: Iterable[
|
186
|
+
def unique(data: Iterable[AnyValue]) -> list[AnyValue]:
|
190
187
|
"""
|
191
188
|
De duplication of data.
|
192
189
|
|
reykit/rlog.py
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
from __future__ import annotations
|
13
|
-
from typing import Any, Literal, Final,
|
13
|
+
from typing import Any, Literal, Final, overload, override
|
14
14
|
from collections.abc import Callable
|
15
15
|
from queue import Queue
|
16
16
|
from os.path import abspath as os_abspath
|
@@ -462,28 +462,6 @@ class RLog(object):
|
|
462
462
|
filter_: Callable[[LogRecord], bool] | None = None
|
463
463
|
) -> ConcurrentTimedRotatingFileHandler: ...
|
464
464
|
|
465
|
-
@overload
|
466
|
-
def add_file(
|
467
|
-
self,
|
468
|
-
path: str | None = None,
|
469
|
-
mb: None = None,
|
470
|
-
time: Any = None,
|
471
|
-
level: int = DEBUG,
|
472
|
-
format_: str | None = None,
|
473
|
-
filter_: Callable[[LogRecord], bool] | None = None
|
474
|
-
) -> NoReturn: ...
|
475
|
-
|
476
|
-
@overload
|
477
|
-
def add_file(
|
478
|
-
self,
|
479
|
-
path: str | None = None,
|
480
|
-
mb: float = None,
|
481
|
-
time: float | Literal['m', 'w0', 'w1', 'w2', 'w3', 'w4', 'w5', 'w6'] = None,
|
482
|
-
level: int = DEBUG,
|
483
|
-
format_: str | None = None,
|
484
|
-
filter_: Callable[[LogRecord], bool] | None = None
|
485
|
-
) -> NoReturn: ...
|
486
|
-
|
487
465
|
def add_file(
|
488
466
|
self,
|
489
467
|
path: str | None = None,
|
reykit/ros.py
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
from __future__ import annotations
|
13
|
-
from typing import Any, Literal,
|
13
|
+
from typing import Any, Literal, overload
|
14
14
|
from io import TextIOBase, BufferedIOBase
|
15
15
|
from os import (
|
16
16
|
walk as os_walk,
|
@@ -219,12 +219,6 @@ def get_file_str(file: FileStr) -> str:
|
|
219
219
|
return file_str
|
220
220
|
|
221
221
|
|
222
|
-
@overload
|
223
|
-
def get_file_bytes(file: FileBytes) -> bytes: ...
|
224
|
-
|
225
|
-
@overload
|
226
|
-
def get_file_bytes(file: Any) -> NoReturn: ...
|
227
|
-
|
228
222
|
def get_file_bytes(file: FileBytes) -> bytes:
|
229
223
|
"""
|
230
224
|
Get file bytes data.
|
reykit/rsystem.py
CHANGED
@@ -232,11 +232,13 @@ def dos_command(command: str | Iterable[str], read: bool = False) -> str | None:
|
|
232
232
|
"""
|
233
233
|
|
234
234
|
# Execute.
|
235
|
-
popen = Popen(command,
|
235
|
+
popen = Popen(command, stdout=PIPE, stderr=PIPE, shell=True)
|
236
236
|
|
237
237
|
# Output.
|
238
238
|
if read:
|
239
|
-
|
239
|
+
stderr_bytes: bytes = popen.stderr.read()
|
240
|
+
stdout_bytes: bytes = popen.stdout.read()
|
241
|
+
output_bytes = stdout_bytes + stderr_bytes
|
240
242
|
output = output_bytes.decode('GBK')
|
241
243
|
|
242
244
|
return output
|
reykit/rtime.py
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
"""
|
10
10
|
|
11
11
|
|
12
|
-
from typing import Any, TypedDict, Literal, overload
|
12
|
+
from typing import Any, TypedDict, Literal, overload
|
13
13
|
from collections.abc import Callable
|
14
14
|
from pandas import (
|
15
15
|
DataFrame,
|
@@ -34,6 +34,7 @@ from .rnumber import digits
|
|
34
34
|
from .rrandom import randn
|
35
35
|
from .rregex import search
|
36
36
|
from .rstdout import echo
|
37
|
+
from .rtype import AnyValue
|
37
38
|
|
38
39
|
|
39
40
|
__all__ = (
|
@@ -65,9 +66,6 @@ def now(format_: Literal['datetime_str', 'date_str', 'time_str'] = 'datetime') -
|
|
65
66
|
@overload
|
66
67
|
def now(format_: Literal['timestamp'] = 'datetime') -> int: ...
|
67
68
|
|
68
|
-
@overload
|
69
|
-
def now(format_: Any) -> NoReturn: ...
|
70
|
-
|
71
69
|
def now(
|
72
70
|
format_: Literal[
|
73
71
|
'datetime',
|
@@ -127,17 +125,10 @@ def time_to(
|
|
127
125
|
|
128
126
|
@overload
|
129
127
|
def time_to(
|
130
|
-
obj:
|
131
|
-
decimal: bool = False,
|
132
|
-
raising: Literal[True] = True
|
133
|
-
) -> NoReturn: ...
|
134
|
-
|
135
|
-
@overload
|
136
|
-
def time_to(
|
137
|
-
obj: Any,
|
128
|
+
obj: AnyValue,
|
138
129
|
decimal: bool = False,
|
139
130
|
raising: Literal[False] = True
|
140
|
-
) ->
|
131
|
+
) -> AnyValue: ...
|
141
132
|
|
142
133
|
def time_to(
|
143
134
|
obj: Any,
|
@@ -322,15 +313,9 @@ def to_time(
|
|
322
313
|
|
323
314
|
@overload
|
324
315
|
def to_time(
|
325
|
-
obj:
|
326
|
-
raising: Literal[True] = True
|
327
|
-
) -> NoReturn: ...
|
328
|
-
|
329
|
-
@overload
|
330
|
-
def to_time(
|
331
|
-
obj: Any,
|
316
|
+
obj: AnyValue,
|
332
317
|
raising: Literal[False] = True
|
333
|
-
) ->
|
318
|
+
) -> AnyValue: ...
|
334
319
|
|
335
320
|
def to_time(
|
336
321
|
obj: Any,
|
reykit/rtype.py
CHANGED
@@ -9,11 +9,12 @@
|
|
9
9
|
"""
|
10
10
|
|
11
11
|
|
12
|
-
from typing import Any, Self
|
12
|
+
from typing import Any, Self, TypeVar
|
13
13
|
from collections.abc import Callable
|
14
14
|
|
15
15
|
|
16
16
|
__all__ = (
|
17
|
+
'AnyValue',
|
17
18
|
'RStaticMeta',
|
18
19
|
'RConfigMeta',
|
19
20
|
'RNull',
|
@@ -21,6 +22,9 @@ __all__ = (
|
|
21
22
|
)
|
22
23
|
|
23
24
|
|
25
|
+
AnyValue = TypeVar('AnyValue')
|
26
|
+
|
27
|
+
|
24
28
|
class RStaticMeta(type):
|
25
29
|
"""
|
26
30
|
Rey's `static meta` type.
|
@@ -1,30 +1,30 @@
|
|
1
1
|
reykit/__init__.py,sha256=QwnhdUDSXgjXJQ4ClaeP9oKXUXyQOPj5sApwGCDrILc,848
|
2
2
|
reykit/rall.py,sha256=mOFwHXZ4-BOkJ5Ptbm6lQc2zwNf_VqcqM6AYYnYPfoo,672
|
3
3
|
reykit/rcomm.py,sha256=LgSLrpUokOgdRMYwuZj6JNvxDyvENwsiOd6ZHo67HBg,11444
|
4
|
-
reykit/rdata.py,sha256=
|
4
|
+
reykit/rdata.py,sha256=tlHpKB3px5KCxhA_rgu_nYOGjHkyJTLqqRlX9UypGR0,8348
|
5
5
|
reykit/remail.py,sha256=rK_hbqGeZh04DnVPtjODLsm_YfdrZ5L-Z6SbjplrfUc,6736
|
6
6
|
reykit/rexception.py,sha256=ftXVdEVkU0B0HXbKjQTiJRJVVGbvhorwWtMiplpN9Zk,8118
|
7
7
|
reykit/rimage.py,sha256=fQpIHX6Go3Jk_MDgsSDnZx27EZHumyGdgI9xyjP5lYQ,6275
|
8
|
-
reykit/rlog.py,sha256=
|
8
|
+
reykit/rlog.py,sha256=qhmATMv3_bJRaiuN9mo8hSf_95HH5Lw838aJFio98sg,25760
|
9
9
|
reykit/rmonkey.py,sha256=RqhmKXabl11s2RJaGizpm00Q1yEkul1Je5uxw8_thUk,7584
|
10
10
|
reykit/rmultitask.py,sha256=9UVAg8P85UsLS_exW-e6tZTa_b5r3ceL7LQRDrP8eAw,21981
|
11
11
|
reykit/rnumber.py,sha256=XseLDNLDOt-XYP2P9oDbkKYuHudeSoWzIHsOENO8vvE,3196
|
12
|
-
reykit/ros.py,sha256=
|
12
|
+
reykit/ros.py,sha256=UXX7FENgVCTR8m6-53CxzJvmPzHIzC7vLK2vyrkySiw,39096
|
13
13
|
reykit/rrandom.py,sha256=fMeorpkjWAAtjD2oZCux3tpYuD2RRoBSkWI0M6NPM5Q,9102
|
14
14
|
reykit/rregex.py,sha256=XTlnDLior8yyncFdrTr9FsVlBcqMXvsWRfpmvQS-BR8,6089
|
15
15
|
reykit/rschedule.py,sha256=7EH_6TdEhwV-T6YyBEGYEcy85I1vTSNutDci-e_veTY,5796
|
16
16
|
reykit/rstdout.py,sha256=vSvD4QjYybNiGnowWLXRU6q1u9ERPjr8YTXgq82eYDU,9648
|
17
|
-
reykit/rsystem.py,sha256=
|
17
|
+
reykit/rsystem.py,sha256=XD5-kjJ0Dx1ONLknbAGt5VRCOYjBPc8qs0bTxt_Lxb0,34754
|
18
18
|
reykit/rtable.py,sha256=gXszf_9DE_5SMdNcxMX-xd4IpHGQVjGsN3NQIm7wVGY,12055
|
19
19
|
reykit/rtext.py,sha256=whaKpVkd36yYVtCmZ1ptp_TVRL1v3f7Jab0vPXC8wXY,11089
|
20
|
-
reykit/rtime.py,sha256=
|
21
|
-
reykit/rtype.py,sha256=
|
20
|
+
reykit/rtime.py,sha256=w11nJTr1x4NPIFAA25O0qSpaYGNYU7s1yFZxxf29KLw,16940
|
21
|
+
reykit/rtype.py,sha256=Hg_LkyGpxLHbj5xwtJOwaqaS6WFwQZifXdC0n0mwhgY,2024
|
22
22
|
reykit/rwrap.py,sha256=AJBYTDLHLGlMSiGIKoVkCsQk-Y4nDHWWFVCdnz5Bwdk,15222
|
23
23
|
reykit/rzip.py,sha256=i6KkmeSWCnq025d-O1mbuCYezNRUhyY9OGVK0CRlNAM,3522
|
24
24
|
reykit/rdll/__init__.py,sha256=vM9V7wSNno-WH9RrxgHTIgCkQm8LmBFoLFO8z7qovNo,306
|
25
25
|
reykit/rdll/rdll_inject.py,sha256=bETl8tywtN1OiQudbA21u6GwBM_bqVX7jbiisNj_JBg,645
|
26
26
|
reykit/rdll/rdll_inject_core.py,sha256=Trgh_pdJs_Lw-Y-0Kkn8kHr4BnilM9dBKnHnX25T_pM,5092
|
27
|
-
reykit-1.1.
|
28
|
-
reykit-1.1.
|
29
|
-
reykit-1.1.
|
30
|
-
reykit-1.1.
|
27
|
+
reykit-1.1.7.dist-info/METADATA,sha256=ZLSlPIdRLy5IwVbLm5bUCH92wAEgH7EfCGDHGbGlHxI,1888
|
28
|
+
reykit-1.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
29
|
+
reykit-1.1.7.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
30
|
+
reykit-1.1.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|