py2ls 0.1.10.2__py3-none-any.whl → 0.1.10.3__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.
py2ls/ips.py CHANGED
@@ -9,6 +9,8 @@ from cycler import cycler
9
9
  from mpl_toolkits.mplot3d import Axes3D
10
10
  import seaborn as sns
11
11
 
12
+ from sklearn.kernel_approximation import KERNEL_PARAMS
13
+ from sympy import is_increasing
12
14
  import sys, os, shutil, re, yaml, json, subprocess
13
15
  import importlib.util
14
16
  import time
@@ -3039,7 +3041,6 @@ def apply_format(ws, cell, cell_range):
3039
3041
  cell_font, cell_fill, cell_alignment, border = None, None, None, None
3040
3042
  kws_cell = ["font", "fill", "alignment", "border"]
3041
3043
  for K, _ in cell.items():
3042
- print(strcmp(K, kws_cell)[0])
3043
3044
  if strcmp(K, kws_cell)[0] == "font":
3044
3045
  #! font
3045
3046
  font_color = "000000"
@@ -3289,9 +3290,9 @@ def apply_format(ws, cell, cell_range):
3289
3290
  None,
3290
3291
  )
3291
3292
  # get styles config
3292
- for k, v in cell.get("border", {}).items():
3293
- if not "style" in k:
3294
- break
3293
+ for k, v in cell.get(K, {}).items():
3294
+ # if not "style" in k:
3295
+ # break
3295
3296
  if strcmp(k, kws_border)[0] in ["style"]:
3296
3297
  border_style_all = strcmp(v, border_styles)[0]
3297
3298
  # 如果设置了style,表示其它的所有的都设置成为一样的
@@ -3635,13 +3636,19 @@ format_excel(
3635
3636
 
3636
3637
  # !Add comment
3637
3638
  if comment:
3638
- for (row, col), comment in comment.items():
3639
- ws.cell(row=row, column=col).comment = Comment(comment, "Author")
3639
+ if not isinstance(comment, list):
3640
+ comment = [comment]
3641
+ for comment_ in comment:
3642
+ for (row, col), comment_str in comment_.items():
3643
+ ws.cell(row=row, column=col).comment = Comment(comment_str, "Author")
3640
3644
 
3641
3645
  # !Add link
3642
3646
  if link:
3643
- for (row, col), link in link.items():
3644
- ws.cell(row=row, column=col).hyperlink = link
3647
+ if not isinstance(link, list):
3648
+ link = [link]
3649
+ for link_ in link:
3650
+ for (row, col), link_str in link_.items():
3651
+ ws.cell(row=row, column=col).hyperlink = link_str
3645
3652
 
3646
3653
  # !Apply data validation
3647
3654
  if data_validation:
@@ -3654,16 +3661,16 @@ format_excel(
3654
3661
  # !Protect sheet with a password
3655
3662
  if protect:
3656
3663
  ws.protection.password = protect.get("password", False)
3657
- ws.protection.objects = protect.get("objects", False)
3658
- ws.protection.sheet = protect.get("sheet", False)
3659
- ws.protection.scenarios = protect.get("scenarios", False)
3664
+ ws.protection.objects = protect.get("objects", True)
3665
+ ws.protection.sheet = protect.get("sheet", True)
3666
+ ws.protection.scenarios = protect.get("scenarios", True)
3660
3667
  ws.protection.formatCells = protect.get("formatCells", False)
3661
3668
  ws.protection.formatColumns = protect.get("formatColumns", False)
3662
3669
  ws.protection.formatRows = protect.get("formatRows", False)
3663
- ws.protection.insertColumns = protect.get("insertColumns", False)
3664
- ws.protection.insertRows = protect.get("insertRows", False)
3665
- ws.protection.deleteColumns = protect.get("deleteColumns", False)
3666
- ws.protection.deleteRows = protect.get("deleteRows", False)
3670
+ ws.protection.insertColumns = protect.get("insertColumns", True)
3671
+ ws.protection.insertRows = protect.get("insertRows", True)
3672
+ ws.protection.deleteColumns = protect.get("deleteColumns", True)
3673
+ ws.protection.deleteRows = protect.get("deleteRows", True)
3667
3674
 
3668
3675
  # !conditional formatting
3669
3676
  if conditional_format:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2ls
3
- Version: 0.1.10.2
3
+ Version: 0.1.10.3
4
4
  Summary: py(thon)2(too)ls
5
5
  Author: Jianfeng
6
6
  Author-email: Jianfeng.Liu0413@gmail.com
@@ -206,7 +206,7 @@ py2ls/doc.py,sha256=xN3g1OWfoaGUhikbJ0NqbN5eKy1VZVvWwRlhHMgyVEc,4243
206
206
  py2ls/export_requirements.py,sha256=x2WgUF0jYKz9GfA1MVKN-MdsM-oQ8yUeC6Ua8oCymio,2325
207
207
  py2ls/freqanalysis.py,sha256=F4218VSPbgL5tnngh6xNCYuNnfR-F_QjECUUxrPYZss,32594
208
208
  py2ls/ich2ls.py,sha256=3E9R8oVpyYZXH5PiIQgT3CN5NxLe4Dwtm2LwaeacE6I,21381
209
- py2ls/ips.py,sha256=rs9PVLgoa-5MMWu-i0zGEtVhalT7fJzxDd7foE3PxdM,135633
209
+ py2ls/ips.py,sha256=xheqYJJkF3LHFS216YWU-iBVMCj4UPaT3uNhP1wSnlk,135905
210
210
  py2ls/netfinder.py,sha256=_stenzqRZsB4m5FDE7YsSkC2jvkmrUOsq48BRQB2mPM,55369
211
211
  py2ls/ocr.py,sha256=pp2YlQmwnej8pFvcdOmR9im9rhLetOlTeayVfecHRwE,25649
212
212
  py2ls/plot.py,sha256=J8hRKLpQXHQRG_xE_nmT0mQvc1IxCMJ21tJmKsUKFl4,96155
@@ -215,6 +215,6 @@ py2ls/sleep_events_detectors.py,sha256=bQA3HJqv5qnYKJJEIhCyhlDtkXQfIzqksnD0YRXso
215
215
  py2ls/stats.py,sha256=fJmXQ9Lq460StOn-kfEljE97cySq7876HUPTnpB5hLs,38123
216
216
  py2ls/translator.py,sha256=zBeq4pYZeroqw3DT-5g7uHfVqKd-EQptT6LJ-Adi8JY,34244
217
217
  py2ls/wb_detector.py,sha256=7y6TmBUj9exCZeIgBAJ_9hwuhkDh1x_-yg4dvNY1_GQ,6284
218
- py2ls-0.1.10.2.dist-info/METADATA,sha256=bZAlDna0SUAmEr0Pob3-yO50Bg4Pl1_RuQv1REPI-mQ,20018
219
- py2ls-0.1.10.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
220
- py2ls-0.1.10.2.dist-info/RECORD,,
218
+ py2ls-0.1.10.3.dist-info/METADATA,sha256=2GFBiM7WCsRfKkqi3HUYz4SN7cseDpzhatl2somrFzk,20018
219
+ py2ls-0.1.10.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
220
+ py2ls-0.1.10.3.dist-info/RECORD,,