reykit 1.1.65__py3-none-any.whl → 1.1.66__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
@@ -432,9 +432,8 @@ def download(url: str, path: str | None = None) -> str:
432
432
  else:
433
433
  file_name = None
434
434
  if file_name is None:
435
- file_type_obj = get_content_type(content)
436
- if file_type_obj is not None:
437
- file_name = 'download.' + file_type_obj.EXTENSION
435
+ file_type_obj = filetype_guess(content)
436
+ file_name = 'download.' + file_type_obj.EXTENSION
438
437
  file_name = file_name or 'download'
439
438
  path = os_abspath(file_name)
440
439
 
reykit/ros.py CHANGED
@@ -352,7 +352,7 @@ class File(Base):
352
352
 
353
353
 
354
354
  @overload
355
- def open(self, mode: OpenBinaryMode = 'wb+', encode: str = 'utf-8') -> BinaryIO: ...
355
+ def open(self, mode: OpenBinaryMode = 'wb+') -> BinaryIO: ...
356
356
 
357
357
  @overload
358
358
  def open(self, mode: OpenTextMode, encode: str = 'utf-8') -> TextIO: ...
@@ -371,6 +371,10 @@ class File(Base):
371
371
  IO object.
372
372
  """
373
373
 
374
+ # Handle parameter.
375
+ if 'b' in mode:
376
+ encode = None
377
+
374
378
  # Open.
375
379
  io = open(self.path, mode, encoding=encode)
376
380
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reykit
3
- Version: 1.1.65
3
+ Version: 1.1.66
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,9 +6,9 @@ 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=6uULgoPk8DTKWg9yNQco7gdw4A59F9ygcZR6rgO4eoY,16897
9
+ reykit/rnet.py,sha256=AfMUcAW26zNauW6PeS3GYkLJcJu_82g1tkZGnc--Qto,16848
10
10
  reykit/rnum.py,sha256=PhG4V_BkVfCJUsbpMDN1umGZly1Hsus80TW8bpyBtyY,3653
11
- reykit/ros.py,sha256=1i878eWvR7L1riTIX_oljg_31V53QOz9sR9b4XEUQ1s,46851
11
+ reykit/ros.py,sha256=Yi_mfYzVHwjjUZke0BNX7PKFLZpoT5NRyj5aDOSNQRU,46911
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
@@ -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.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,,
25
+ reykit-1.1.66.dist-info/METADATA,sha256=TXCGGPt494VS6fF95ogjAuJovsm4kqc-TCMinRBG-X8,1872
26
+ reykit-1.1.66.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
+ reykit-1.1.66.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
28
+ reykit-1.1.66.dist-info/RECORD,,