reykit 1.1.63__py3-none-any.whl → 1.1.65__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/ros.py CHANGED
@@ -352,38 +352,27 @@ class File(Base):
352
352
 
353
353
 
354
354
  @overload
355
- def open(self, mode: OpenBinaryMode = 'wb+') -> BinaryIO: ...
355
+ def open(self, mode: OpenBinaryMode = 'wb+', encode: str = 'utf-8') -> BinaryIO: ...
356
356
 
357
357
  @overload
358
- def open(self, mode: OpenTextMode) -> TextIO: ...
358
+ def open(self, mode: OpenTextMode, encode: str = 'utf-8') -> TextIO: ...
359
359
 
360
- def open(self, mode: OpenTextMode | OpenBinaryMode = 'wb+') -> TextIO | BinaryIO:
360
+ def open(self, mode: OpenTextMode | OpenBinaryMode = 'wb+', encode: str = 'utf-8') -> TextIO | BinaryIO:
361
361
  """
362
362
  Open file.
363
363
 
364
364
  Parameters
365
365
  ----------
366
366
  mode : Open mode.
367
+ encode : Encoding method.
367
368
 
368
369
  Returns
369
370
  -------
370
371
  IO object.
371
372
  """
372
373
 
373
- # Handle parameter.
374
- if (
375
- (
376
- 'r' in mode
377
- or '+' in mode
378
- )
379
- and 'b' not in mode
380
- ):
381
- encoding = 'utf-8'
382
- else:
383
- encoding = None
384
-
385
374
  # Open.
386
- io = open(self.path, mode, encoding=encoding)
375
+ io = open(self.path, mode, encoding=encode)
387
376
 
388
377
  return io
389
378
 
reykit/rsys.py CHANGED
@@ -172,7 +172,7 @@ def del_modules(path: str) -> list[str]:
172
172
 
173
173
  # Set parameter.
174
174
  deleted_dict = {}
175
- module_keys = tuple(sys_modules.keys())
175
+ module_keys = tuple(sys_modules)
176
176
 
177
177
  # Delete.
178
178
  for key in module_keys:
reykit/rtable.py CHANGED
@@ -88,7 +88,7 @@ def is_table(obj: Any) -> bool:
88
88
  for row in obj:
89
89
  if not isinstance(row, MutableMapping):
90
90
  break
91
- keys_str = ':'.join(row.keys())
91
+ keys_str = ':'.join(row)
92
92
  keys_strs.append(keys_str)
93
93
  keys_strs = set(keys_strs)
94
94
  if len(keys_strs) == 1:
@@ -197,7 +197,7 @@ class Table(Base):
197
197
  return {}
198
198
 
199
199
  # Get fields.
200
- fields = list(data[0].keys())
200
+ fields = list(data[0])
201
201
  if type(key_field) == int:
202
202
  key_field = fields[key_field]
203
203
  if type(val_field) == int:
@@ -249,7 +249,7 @@ class Table(Base):
249
249
  return []
250
250
 
251
251
  # Get fields.
252
- fields = list(data[0].keys())
252
+ fields = list(data[0])
253
253
  if type(field) == int:
254
254
  field = fields[field]
255
255
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reykit
3
- Version: 1.1.63
3
+ Version: 1.1.65
4
4
  Summary: Kit method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reykit/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -8,13 +8,13 @@ reykit/rlog.py,sha256=TRAWaVG9KTgzeNjN-FXkcvBmvq1IhICgawllQEGoUdg,25745
8
8
  reykit/rmonkey.py,sha256=Dj2GBzBDFXbo0Z-5f8Zep4dfbaIw1bo1FUmC31xvDuk,7929
9
9
  reykit/rnet.py,sha256=6uULgoPk8DTKWg9yNQco7gdw4A59F9ygcZR6rgO4eoY,16897
10
10
  reykit/rnum.py,sha256=PhG4V_BkVfCJUsbpMDN1umGZly1Hsus80TW8bpyBtyY,3653
11
- reykit/ros.py,sha256=8bLvjt0WkUPF6bkwQnm4xeoZTeKqcwM3a0EFt51WNaU,47006
11
+ reykit/ros.py,sha256=1i878eWvR7L1riTIX_oljg_31V53QOz9sR9b4XEUQ1s,46851
12
12
  reykit/rrand.py,sha256=4VwooITgox54_GonELcJfcIpStDi-UJchpnyWKnyeIA,8606
13
13
  reykit/rre.py,sha256=1qva7xatKVE9qC2j7IujjXSM59qxHWwTYpiizFFQ8Xo,6024
14
14
  reykit/rschedule.py,sha256=QakEAtOcMg8uL2iOLre9uSsH-DsW6uAvzdXFiPJw_1o,5767
15
15
  reykit/rstdout.py,sha256=yesWo7wIGablpyAu-2J2Gw11Qp3GdQjGICTyIcvLyt4,8200
16
- reykit/rsys.py,sha256=cafnGGerxR0kg5GHNJojmvsMDNsjgsJ3CtIGH5mAJa8,24953
17
- reykit/rtable.py,sha256=YuDH2GL9Lwr5LljRDm5hzHrsvaXOs4-X89XVwFD-b0g,12221
16
+ reykit/rsys.py,sha256=AP62KyN40flCeQJBclfJq8shachSAFT0LkVjiKsXkrw,24946
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=8QJ6YNiC0JUDiW1xc1tkzQUMPYOFT7d7dKCYRuYt9co,17635
@@ -22,7 +22,7 @@ reykit/rwrap.py,sha256=FEmeK_fboJ-OyXeJf8bilc7U2ph8xIbZGNHb6fLCy2c,15063
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.63.dist-info/METADATA,sha256=tihJAcxYIv4nsnmBVjv-YF-_T2vxcAjHfo81qxG9BVQ,1872
26
- reykit-1.1.63.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
- reykit-1.1.63.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
28
- reykit-1.1.63.dist-info/RECORD,,
25
+ reykit-1.1.65.dist-info/METADATA,sha256=0CfsmXBOu4AKZIu9TANgMf65AOFT2vk2_-tGX2digT8,1872
26
+ reykit-1.1.65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
+ reykit-1.1.65.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
28
+ reykit-1.1.65.dist-info/RECORD,,