浏览代码

chore: black fmt

Joao Andre 1 年之前
父节点
当前提交
b0ec24f2c9

+ 2 - 1
.github/workflows/linter.yml

@@ -20,7 +20,8 @@ jobs:
         with:
           use-pylint: false
           use-isort: false
+          use-mypy: false
           extra-black-options: "--line-length=120"
           extra-pycodestyle-options: "--max-line-length=120  --exclude=tests/gui --ignore=E121,E123,E126,E226,E24,E704,W503,W504,E203"
-          extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude src/taipy/templates --follow-imports skip"
+          extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (src/taipy/templates/|generate_pyi.py) --follow-imports skip"
           extra-isort-options: "--line-length=120 --force-grid-wrap=10 --multi-line=VERTICAL_HANGING_INDENT --trailing-comma"

+ 3 - 2
doc/gui/examples/charts/heatmap-drawing-on-top.py

@@ -14,6 +14,7 @@
 #     python <script>
 # -----------------------------------------------------------------------------------------
 import numpy
+
 from taipy.gui import Gui
 
 
@@ -30,8 +31,8 @@ def spiral(th):
 
 # Prepare the heatmap x and y cell sizes along the axes
 golden_ratio = (1 + numpy.sqrt(5)) / 2.0  # Golden ratio
-grid_x = [0, 1, 1 + (1 / (golden_ratio**4)), 1 + (1 / (golden_ratio**3)), golden_ratio]
-grid_y = [0, 1 / (golden_ratio**3), 1 / golden_ratio**3 + 1 / golden_ratio**4, 1 / (golden_ratio**2), 1]
+grid_x = [0, 1, 1 + (1 / (golden_ratio ** 4)), 1 + (1 / (golden_ratio ** 3)), golden_ratio]
+grid_y = [0, 1 / (golden_ratio ** 3), 1 / golden_ratio ** 3 + 1 / golden_ratio ** 4, 1 / (golden_ratio ** 2), 1]
 
 # Main value is based on the Fibonacci sequence
 z = [[13, 3, 3, 5], [13, 2, 1, 5], [13, 10, 11, 12], [13, 8, 8, 8]]

+ 2 - 2
src/taipy/gui/data/decimator/rdp.py

@@ -61,7 +61,7 @@ class RDP(Decimator):
         xdiff = P2[0] - P1[0]
         ydiff = P2[1] - P1[1]
         nom = (ydiff * points[:, 0] - xdiff * points[:, 1] + P2[0] * P1[1] - P2[1] * P1[0]) ** 2
-        denom = ydiff**2 + xdiff**2
+        denom = ydiff ** 2 + xdiff ** 2
         return np.divide(nom, denom)
 
     @staticmethod
@@ -90,7 +90,7 @@ class RDP(Decimator):
             points = data[start + 1 : end]
             dsq = RDP.dsquared_line_points(P1, P2, points)
 
-            mask_eps = dsq > epsilon**2
+            mask_eps = dsq > epsilon ** 2
 
             if mask_eps.any():
                 # max point outside eps