reykit 1.1.78__py3-none-any.whl → 1.1.80__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/rnet.py CHANGED
@@ -353,7 +353,7 @@ def request(
353
353
  item_data, item_headers = value, {}
354
354
  if type(item_data) == str:
355
355
  file = File(item_data)
356
- data = file.bytes
356
+ item_data = file.bytes
357
357
  item_headers.setdefault('filename', file.name_suffix)
358
358
  if type(item_data) == bytes:
359
359
  if 'Content-Type' not in item_headers:
reykit/rnum.py CHANGED
@@ -64,7 +64,6 @@ def digits(number: int | float) -> tuple[int, int]:
64
64
  int_digits = len(number_str)
65
65
  dec_digits = 0
66
66
  else:
67
- number = int(number)
68
67
  number_str = str(number)
69
68
  int_str, dec_str = number_str.split('.')
70
69
  int_digits = len(int_str)
reykit/rschedule.py CHANGED
@@ -167,13 +167,13 @@ class Schedule(Base):
167
167
  'task': task.__name__,
168
168
  'note': note
169
169
  }
170
- conn = self.database.connect()
171
- conn.execute_insert(
172
- (self.db_names['base'], self.db_names['base.schedule']),
173
- data
174
- )
175
- id_ = conn.variables['identity']
176
- conn.commit()
170
+ with self.database.connect() as conn:
171
+ conn = self.database.connect()
172
+ conn.execute_insert(
173
+ (self.db_names['base'], self.db_names['base.schedule']),
174
+ data
175
+ )
176
+ id_ = conn.insert_id
177
177
 
178
178
  # Try execute.
179
179
 
reykit/rwrap.py CHANGED
@@ -38,8 +38,8 @@ __all__ = (
38
38
  )
39
39
 
40
40
 
41
- type Decorated = Callable
42
- type Decorator = Callable[..., Decorated]
41
+ type DecoratedCallable = Callable
42
+ type Decorator = Callable[..., DecoratedCallable]
43
43
 
44
44
 
45
45
  def wrap_wrap(decorator: Decorator | None = None) -> Decorator:
@@ -82,13 +82,13 @@ def wrap_wrap(decorator: Decorator | None = None) -> Decorator:
82
82
 
83
83
  # Decorate Decorator.
84
84
  @overload
85
- def _wrap(func: Callable, **wrap_kwargs: Any) -> Decorated: ...
85
+ def _wrap(func: Callable, **wrap_kwargs: Any) -> DecoratedCallable: ...
86
86
 
87
87
  @overload
88
88
  def _wrap(**wrap_kwargs: Any) -> Decorator: ...
89
89
 
90
90
  @functools_wraps(decorator)
91
- def _wrap(func: Callable | None = None, **wrap_kwargs: Any) -> Decorated | Decorator:
91
+ def _wrap(func: Callable | None = None, **wrap_kwargs: Any) -> DecoratedCallable | Decorator:
92
92
  """
93
93
  Decorated decorator.
94
94
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reykit
3
- Version: 1.1.78
3
+ Version: 1.1.80
4
4
  Summary: Kit method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reykit/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -6,23 +6,23 @@ reykit/remail.py,sha256=l4HGKXdfHNBxyBT3YxeZyQhfecbElqTqSAGInwWhap8,6723
6
6
  reykit/rimage.py,sha256=lNN2iMpvSMqh-nPTpxrA9yHy43EA5WoYdxKYhqPwMgk,6154
7
7
  reykit/rlog.py,sha256=TRAWaVG9KTgzeNjN-FXkcvBmvq1IhICgawllQEGoUdg,25745
8
8
  reykit/rmonkey.py,sha256=Dj2GBzBDFXbo0Z-5f8Zep4dfbaIw1bo1FUmC31xvDuk,7929
9
- reykit/rnet.py,sha256=ql1L-QCoa_nZ2Vp8cpZrWl4AoxfZq9dhPdistiAdM64,17767
10
- reykit/rnum.py,sha256=PhG4V_BkVfCJUsbpMDN1umGZly1Hsus80TW8bpyBtyY,3653
9
+ reykit/rnet.py,sha256=YvoLffHcMK43GMoXKQXDTHFP9fiVTH5uzmN-glRBuFY,17772
10
+ reykit/rnum.py,sha256=VKICD64mEfiStAGWaxg3kzQjf7TTqiSBNe9LCpM9MLo,3623
11
11
  reykit/ros.py,sha256=O5xAqVR1S5pGU-ryKh6JFN9ztO-GNMl_83fWoh75zOY,47873
12
12
  reykit/rrand.py,sha256=4VwooITgox54_GonELcJfcIpStDi-UJchpnyWKnyeIA,8606
13
13
  reykit/rre.py,sha256=1qva7xatKVE9qC2j7IujjXSM59qxHWwTYpiizFFQ8Xo,6024
14
- reykit/rschedule.py,sha256=HuQRSNF6yd397P9knIX9-z8Ii1tUXFUL_-zxTIkxir0,14804
14
+ reykit/rschedule.py,sha256=u-GbCUPFnNBeRTqYS8eJxq6zTISdqHzEimNcTXgatr8,14840
15
15
  reykit/rstdout.py,sha256=yesWo7wIGablpyAu-2J2Gw11Qp3GdQjGICTyIcvLyt4,8200
16
16
  reykit/rsys.py,sha256=AP62KyN40flCeQJBclfJq8shachSAFT0LkVjiKsXkrw,24946
17
17
  reykit/rtable.py,sha256=UQ-JlwjssMR3gY1iY-VGQEKQ5_BZabpJy6TL7Fx19c4,12200
18
18
  reykit/rtask.py,sha256=NUTngUUDUZy3TqEHiuiKy17FcE0F1zS118KnKTsBjng,22838
19
19
  reykit/rtext.py,sha256=cWHy19lDcJvpX7LU95kmRVsDimpAUaz5TbKC1h83gB4,13254
20
20
  reykit/rtime.py,sha256=lsSKaYFmYXlDN18yj2fLVTKSruzgygl8icW6_Fl42Xk,17807
21
- reykit/rwrap.py,sha256=FEmeK_fboJ-OyXeJf8bilc7U2ph8xIbZGNHb6fLCy2c,15063
21
+ reykit/rwrap.py,sha256=G4TL2GWUaW9DrCFRcsnDE1CwgdWeP2PnjQckheRx4p0,15095
22
22
  reykit/rzip.py,sha256=BGEONswuBZxQ-zcgd_xp2fcvYesC9AmKaaXWvnT3bTI,3456
23
23
  reykit/rdll/__init__.py,sha256=nLSb8onBm2ilyoxzpDzUeGfSCKwkLEesIhzK3LiJ8mk,701
24
24
  reykit/rdll/rdll_core.py,sha256=o6-rKcTQgxZQe0kD3GnwyNb3KL9IogzgCQNOmYLMm7A,5086
25
- reykit-1.1.78.dist-info/METADATA,sha256=QsUb6Z4hLUmpgzrm2oWUL0UvN_eNq9kQ-P_Z49KYJWk,1872
26
- reykit-1.1.78.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
- reykit-1.1.78.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
28
- reykit-1.1.78.dist-info/RECORD,,
25
+ reykit-1.1.80.dist-info/METADATA,sha256=DVi2kyKfp-KjdCScb3Qs7175bvFXcQ9IdfKdyOk9caM,1872
26
+ reykit-1.1.80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
+ reykit-1.1.80.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
28
+ reykit-1.1.80.dist-info/RECORD,,