Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup imports management in Python #304

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

K-Phoen
Copy link
Member

@K-Phoen K-Phoen commented Apr 3, 2024

Mostly some renamings, to make the imports management more understandable.

Imports are also now sorted, to ensure a reproducible output

@K-Phoen K-Phoen self-assigned this Apr 3, 2024
@K-Phoen K-Phoen requested a review from a team as a code owner April 3, 2024 13:23
Copy link

github-actions bot commented Apr 3, 2024

Note: in addition to the changes introduced by this PR, the diff includes unreleased changes living in main.

🔎 Changes to grafana-foundation-sdk@next+cog-v0.0.x

diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml
new file mode 100644
index 0000000..3adda52
--- /dev/null
+++ b/.github/workflows/python-ci.yaml
@@ -0,0 +1,32 @@
+# Code generated - EDITING IS FUTILE. DO NOT EDIT.
+
+name: Python CI
+on:
+  pull_request: ~
+
+env:
+  PYTHON_VERSION: '3.12'
+
+jobs:
+  python:
+    name: Python
+    runs-on: ubuntu-latest
+
+    defaults:
+      run:
+        shell: bash
+        working-directory: ./python
+
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Setup Python ${{ env.PYTHON_VERSION }}
+        uses: actions/setup-python@v5
+        with:
+          python-version: ${{ env.PYTHON_VERSION }}
+
+      - name: Install mypy
+        run: python3 -m pip install mypy
+
+      - name: Lint generated Python code
+        run: mypy .
diff --git a/python/grafana_foundation_sdk/builders/accesspolicy.py b/python/grafana_foundation_sdk/builders/accesspolicy.py
index 9ea14ee..3aa2fe3 100644
--- a/python/grafana_foundation_sdk/builders/accesspolicy.py
+++ b/python/grafana_foundation_sdk/builders/accesspolicy.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
 from ..models import accesspolicy
+from ..cog import builder as cogbuilder
+import typing
 
 
 class AccessPolicy(cogbuilder.Builder[accesspolicy.AccessPolicy]):    
diff --git a/python/grafana_foundation_sdk/builders/annotationslist.py b/python/grafana_foundation_sdk/builders/annotationslist.py
index d22a40a..b760e7f 100644
--- a/python/grafana_foundation_sdk/builders/annotationslist.py
+++ b/python/grafana_foundation_sdk/builders/annotationslist.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
-from ..models import dashboard
 from ..models import annotationslist
+from ..cog import builder as cogbuilder
 from ..cog import variants as cogvariants
+from ..models import dashboard
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/azuremonitor.py b/python/grafana_foundation_sdk/builders/azuremonitor.py
index 38bd3d4..6cb5faa 100644
--- a/python/grafana_foundation_sdk/builders/azuremonitor.py
+++ b/python/grafana_foundation_sdk/builders/azuremonitor.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
 from ..models import azuremonitor
+from ..cog import builder as cogbuilder
+import typing
 
 
 class AzureMonitorQuery(cogbuilder.Builder[azuremonitor.AzureMonitorQuery]):    
diff --git a/python/grafana_foundation_sdk/builders/barchart.py b/python/grafana_foundation_sdk/builders/barchart.py
index 723260b..6599347 100644
--- a/python/grafana_foundation_sdk/builders/barchart.py
+++ b/python/grafana_foundation_sdk/builders/barchart.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
-from ..models import dashboard
 from ..models import barchart
+from ..cog import builder as cogbuilder
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/bargauge.py b/python/grafana_foundation_sdk/builders/bargauge.py
index a635872..4b3f4de 100644
--- a/python/grafana_foundation_sdk/builders/bargauge.py
+++ b/python/grafana_foundation_sdk/builders/bargauge.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
-from ..models import dashboard
 from ..models import bargauge
+from ..cog import builder as cogbuilder
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/candlestick.py b/python/grafana_foundation_sdk/builders/candlestick.py
index de937b5..3d6a0a0 100644
--- a/python/grafana_foundation_sdk/builders/candlestick.py
+++ b/python/grafana_foundation_sdk/builders/candlestick.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
-from ..models import dashboard
 from ..models import candlestick
+from ..cog import builder as cogbuilder
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/canvas.py b/python/grafana_foundation_sdk/builders/canvas.py
index 449ca24..c26f1ee 100644
--- a/python/grafana_foundation_sdk/builders/canvas.py
+++ b/python/grafana_foundation_sdk/builders/canvas.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
-from ..models import dashboard
 from ..models import canvas
+from ..cog import builder as cogbuilder
 from ..cog import variants as cogvariants
+from ..models import dashboard
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/cloudwatch.py b/python/grafana_foundation_sdk/builders/cloudwatch.py
index dffe601..0f348c5 100644
--- a/python/grafana_foundation_sdk/builders/cloudwatch.py
+++ b/python/grafana_foundation_sdk/builders/cloudwatch.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..cog import builder as cogbuilder
 from ..models import cloudwatch
+from ..cog import builder as cogbuilder
+import typing
 
 
 class MetricStat(cogbuilder.Builder[cloudwatch.MetricStat]):    
diff --git a/python/grafana_foundation_sdk/builders/common.py b/python/grafana_foundation_sdk/builders/common.py
index ff9621c..76ca425 100644
--- a/python/grafana_foundation_sdk/builders/common.py
+++ b/python/grafana_foundation_sdk/builders/common.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import common
+import typing
 
 
 class DataSourceJsonData(cogbuilder.Builder[common.DataSourceJsonData]):    
diff --git a/python/grafana_foundation_sdk/builders/dashboard.py b/python/grafana_foundation_sdk/builders/dashboard.py
index d484bb7..b861da1 100644
--- a/python/grafana_foundation_sdk/builders/dashboard.py
+++ b/python/grafana_foundation_sdk/builders/dashboard.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
 from ..cog import variants as cogvariants
+from ..models import dashboard
+import typing
 
 
 class Dashboard(cogbuilder.Builder[dashboard.Dashboard]):    
diff --git a/python/grafana_foundation_sdk/builders/dashboardlist.py b/python/grafana_foundation_sdk/builders/dashboardlist.py
index ac1dca6..37a93e6 100644
--- a/python/grafana_foundation_sdk/builders/dashboardlist.py
+++ b/python/grafana_foundation_sdk/builders/dashboardlist.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
+from ..cog import variants as cogvariants
 from ..models import dashboard
 from ..models import dashboardlist
-from ..cog import variants as cogvariants
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/datagrid.py b/python/grafana_foundation_sdk/builders/datagrid.py
index 62c282d..354bee0 100644
--- a/python/grafana_foundation_sdk/builders/datagrid.py
+++ b/python/grafana_foundation_sdk/builders/datagrid.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
+from ..cog import variants as cogvariants
 from ..models import dashboard
 from ..models import datagrid
-from ..cog import variants as cogvariants
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/debug.py b/python/grafana_foundation_sdk/builders/debug.py
index 39dfc25..98db6c1 100644
--- a/python/grafana_foundation_sdk/builders/debug.py
+++ b/python/grafana_foundation_sdk/builders/debug.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
+from ..cog import variants as cogvariants
 from ..models import dashboard
 from ..models import debug
-from ..cog import variants as cogvariants
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/elasticsearch.py b/python/grafana_foundation_sdk/builders/elasticsearch.py
index d6bf09d..b0d55cf 100644
--- a/python/grafana_foundation_sdk/builders/elasticsearch.py
+++ b/python/grafana_foundation_sdk/builders/elasticsearch.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import elasticsearch
+import typing
 
 
 class BaseBucketAggregation(cogbuilder.Builder[elasticsearch.BaseBucketAggregation]):    
diff --git a/python/grafana_foundation_sdk/builders/gauge.py b/python/grafana_foundation_sdk/builders/gauge.py
index 2a6d4be..0ad4a73 100644
--- a/python/grafana_foundation_sdk/builders/gauge.py
+++ b/python/grafana_foundation_sdk/builders/gauge.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import gauge
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import gauge
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/geomap.py b/python/grafana_foundation_sdk/builders/geomap.py
index 3d31400..63bff51 100644
--- a/python/grafana_foundation_sdk/builders/geomap.py
+++ b/python/grafana_foundation_sdk/builders/geomap.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import geomap
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import geomap
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/googlecloudmonitoring.py b/python/grafana_foundation_sdk/builders/googlecloudmonitoring.py
index 7fb36a4..869bb61 100644
--- a/python/grafana_foundation_sdk/builders/googlecloudmonitoring.py
+++ b/python/grafana_foundation_sdk/builders/googlecloudmonitoring.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import googlecloudmonitoring
+import typing
 
 
 class CloudMonitoringQuery(cogbuilder.Builder[googlecloudmonitoring.CloudMonitoringQuery]):    
diff --git a/python/grafana_foundation_sdk/builders/grafanapyroscope.py b/python/grafana_foundation_sdk/builders/grafanapyroscope.py
index 9656004..6f63748 100644
--- a/python/grafana_foundation_sdk/builders/grafanapyroscope.py
+++ b/python/grafana_foundation_sdk/builders/grafanapyroscope.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import grafanapyroscope
+import typing
 
 
 class Dataquery(cogbuilder.Builder[grafanapyroscope.Dataquery]):    
diff --git a/python/grafana_foundation_sdk/builders/heatmap.py b/python/grafana_foundation_sdk/builders/heatmap.py
index 37e10ba..c80cb1d 100644
--- a/python/grafana_foundation_sdk/builders/heatmap.py
+++ b/python/grafana_foundation_sdk/builders/heatmap.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import heatmap
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import heatmap
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/histogram.py b/python/grafana_foundation_sdk/builders/histogram.py
index 6d366e3..a87a8c8 100644
--- a/python/grafana_foundation_sdk/builders/histogram.py
+++ b/python/grafana_foundation_sdk/builders/histogram.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import histogram
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import histogram
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/librarypanel.py b/python/grafana_foundation_sdk/builders/librarypanel.py
index c31039d..54522b5 100644
--- a/python/grafana_foundation_sdk/builders/librarypanel.py
+++ b/python/grafana_foundation_sdk/builders/librarypanel.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import librarypanel
 from ..cog import variants as cogvariants
 from ..models import dashboard
+from ..models import librarypanel
+import typing
 
 
 class LibraryPanel(cogbuilder.Builder[librarypanel.LibraryPanel]):    
diff --git a/python/grafana_foundation_sdk/builders/logs.py b/python/grafana_foundation_sdk/builders/logs.py
index e253e6d..90fa8a2 100644
--- a/python/grafana_foundation_sdk/builders/logs.py
+++ b/python/grafana_foundation_sdk/builders/logs.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import logs
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import logs
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/loki.py b/python/grafana_foundation_sdk/builders/loki.py
index 32aee87..b2b8639 100644
--- a/python/grafana_foundation_sdk/builders/loki.py
+++ b/python/grafana_foundation_sdk/builders/loki.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import loki
+import typing
 
 
 class Dataquery(cogbuilder.Builder[loki.Dataquery]):    
diff --git a/python/grafana_foundation_sdk/builders/news.py b/python/grafana_foundation_sdk/builders/news.py
index 5b811d4..566c034 100644
--- a/python/grafana_foundation_sdk/builders/news.py
+++ b/python/grafana_foundation_sdk/builders/news.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
+from ..cog import variants as cogvariants
 from ..models import dashboard
 from ..models import news
-from ..cog import variants as cogvariants
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/nodegraph.py b/python/grafana_foundation_sdk/builders/nodegraph.py
index ab99e5c..bedfa75 100644
--- a/python/grafana_foundation_sdk/builders/nodegraph.py
+++ b/python/grafana_foundation_sdk/builders/nodegraph.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
+from ..cog import variants as cogvariants
 from ..models import dashboard
 from ..models import nodegraph
-from ..cog import variants as cogvariants
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/parca.py b/python/grafana_foundation_sdk/builders/parca.py
index 052fe24..af51d49 100644
--- a/python/grafana_foundation_sdk/builders/parca.py
+++ b/python/grafana_foundation_sdk/builders/parca.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import parca
+import typing
 
 
 class Dataquery(cogbuilder.Builder[parca.Dataquery]):    
diff --git a/python/grafana_foundation_sdk/builders/piechart.py b/python/grafana_foundation_sdk/builders/piechart.py
index 91c7c59..29fa832 100644
--- a/python/grafana_foundation_sdk/builders/piechart.py
+++ b/python/grafana_foundation_sdk/builders/piechart.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import piechart
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import piechart
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/preferences.py b/python/grafana_foundation_sdk/builders/preferences.py
index 10a7f31..257ed45 100644
--- a/python/grafana_foundation_sdk/builders/preferences.py
+++ b/python/grafana_foundation_sdk/builders/preferences.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import preferences
+import typing
 
 
 class Preferences(cogbuilder.Builder[preferences.Preferences]):    
diff --git a/python/grafana_foundation_sdk/builders/prometheus.py b/python/grafana_foundation_sdk/builders/prometheus.py
index bcdf073..72bf714 100644
--- a/python/grafana_foundation_sdk/builders/prometheus.py
+++ b/python/grafana_foundation_sdk/builders/prometheus.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import prometheus
+import typing
 
 
 class Dataquery(cogbuilder.Builder[prometheus.Dataquery]):    
diff --git a/python/grafana_foundation_sdk/builders/publicdashboard.py b/python/grafana_foundation_sdk/builders/publicdashboard.py
index 5574cc0..e49eaf6 100644
--- a/python/grafana_foundation_sdk/builders/publicdashboard.py
+++ b/python/grafana_foundation_sdk/builders/publicdashboard.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import publicdashboard
+import typing
 
 
 class PublicDashboard(cogbuilder.Builder[publicdashboard.PublicDashboard]):    
diff --git a/python/grafana_foundation_sdk/builders/role.py b/python/grafana_foundation_sdk/builders/role.py
index 3675ae7..166de9f 100644
--- a/python/grafana_foundation_sdk/builders/role.py
+++ b/python/grafana_foundation_sdk/builders/role.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import role
+import typing
 
 
 class Role(cogbuilder.Builder[role.Role]):    
diff --git a/python/grafana_foundation_sdk/builders/rolebinding.py b/python/grafana_foundation_sdk/builders/rolebinding.py
index 7cf80cf..dcbfb05 100644
--- a/python/grafana_foundation_sdk/builders/rolebinding.py
+++ b/python/grafana_foundation_sdk/builders/rolebinding.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import rolebinding
+import typing
 
 
 class RoleBinding(cogbuilder.Builder[rolebinding.RoleBinding]):    
diff --git a/python/grafana_foundation_sdk/builders/stat.py b/python/grafana_foundation_sdk/builders/stat.py
index b6eebd3..72196c1 100644
--- a/python/grafana_foundation_sdk/builders/stat.py
+++ b/python/grafana_foundation_sdk/builders/stat.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import stat
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import stat
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/statetimeline.py b/python/grafana_foundation_sdk/builders/statetimeline.py
index 0a04398..65b7c2a 100644
--- a/python/grafana_foundation_sdk/builders/statetimeline.py
+++ b/python/grafana_foundation_sdk/builders/statetimeline.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import statetimeline
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import statetimeline
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/statushistory.py b/python/grafana_foundation_sdk/builders/statushistory.py
index f305e5e..a1a356d 100644
--- a/python/grafana_foundation_sdk/builders/statushistory.py
+++ b/python/grafana_foundation_sdk/builders/statushistory.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import statushistory
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import statushistory
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/table.py b/python/grafana_foundation_sdk/builders/table.py
index 902e910..4595178 100644
--- a/python/grafana_foundation_sdk/builders/table.py
+++ b/python/grafana_foundation_sdk/builders/table.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import table
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import table
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/team.py b/python/grafana_foundation_sdk/builders/team.py
index f55d32b..3ccb8a2 100644
--- a/python/grafana_foundation_sdk/builders/team.py
+++ b/python/grafana_foundation_sdk/builders/team.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import team
+import typing
 
 
 class Team(cogbuilder.Builder[team.Team]):    
diff --git a/python/grafana_foundation_sdk/builders/tempo.py b/python/grafana_foundation_sdk/builders/tempo.py
index 03cbcfb..43e4579 100644
--- a/python/grafana_foundation_sdk/builders/tempo.py
+++ b/python/grafana_foundation_sdk/builders/tempo.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
 from ..models import tempo
+import typing
 
 
 class TempoQuery(cogbuilder.Builder[tempo.TempoQuery]):    
diff --git a/python/grafana_foundation_sdk/builders/text.py b/python/grafana_foundation_sdk/builders/text.py
index 086cc4f..27ab587 100644
--- a/python/grafana_foundation_sdk/builders/text.py
+++ b/python/grafana_foundation_sdk/builders/text.py
@@ -1,10 +1,10 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
+from ..cog import variants as cogvariants
 from ..models import dashboard
 from ..models import text
-from ..cog import variants as cogvariants
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/timeseries.py b/python/grafana_foundation_sdk/builders/timeseries.py
index fba53cf..80f6e9c 100644
--- a/python/grafana_foundation_sdk/builders/timeseries.py
+++ b/python/grafana_foundation_sdk/builders/timeseries.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import timeseries
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import timeseries
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/trend.py b/python/grafana_foundation_sdk/builders/trend.py
index 0932353..d75fd50 100644
--- a/python/grafana_foundation_sdk/builders/trend.py
+++ b/python/grafana_foundation_sdk/builders/trend.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import trend
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+from ..models import trend
+import typing
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/builders/xychart.py b/python/grafana_foundation_sdk/builders/xychart.py
index 5e46b68..960bc44 100644
--- a/python/grafana_foundation_sdk/builders/xychart.py
+++ b/python/grafana_foundation_sdk/builders/xychart.py
@@ -1,11 +1,11 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import builder as cogbuilder
-from ..models import dashboard
-from ..models import xychart
 from ..cog import variants as cogvariants
 from ..models import common
+from ..models import dashboard
+import typing
+from ..models import xychart
 
 
 class Panel(cogbuilder.Builder[dashboard.Panel]):    
diff --git a/python/grafana_foundation_sdk/cog/plugins.py b/python/grafana_foundation_sdk/cog/plugins.py
index 22b556d..51e7a90 100644
--- a/python/grafana_foundation_sdk/cog/plugins.py
+++ b/python/grafana_foundation_sdk/cog/plugins.py
@@ -1,38 +1,38 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-from ..models import loki
 from ..models import annotationslist
-from ..models import dashboardlist
-from ..models import prometheus
 from ..models import azuremonitor
 from ..models import barchart
+from ..models import bargauge
 from ..models import candlestick
+from ..models import canvas
+from ..models import cloudwatch
+from ..models import dashboardlist
 from ..models import datagrid
-from ..models import heatmap
-from ..models import piechart
-from ..models import trend
-from ..models import xychart
-from ..models import gauge
-from ..models import news
-from ..models import tempo
-from ..models import bargauge
 from ..models import debug
-from ..models import grafanapyroscope
-from ..models import nodegraph
-from ..models import statushistory
-from ..models import timeseries
-from ..models import text
-from ..models import canvas
+from ..models import elasticsearch
+from ..models import gauge
 from ..models import geomap
+from ..models import googlecloudmonitoring
+from ..models import grafanapyroscope
+from ..models import heatmap
+from ..models import histogram
 from ..models import logs
+from ..models import loki
+from ..models import news
+from ..models import nodegraph
 from ..models import parca
+from ..models import piechart
+from ..models import prometheus
 from ..models import stat
 from ..models import statetimeline
+from ..models import statushistory
 from ..models import table
-from ..models import elasticsearch
-from ..models import cloudwatch
-from ..models import googlecloudmonitoring
-from ..models import histogram
+from ..models import tempo
+from ..models import text
+from ..models import timeseries
+from ..models import trend
+from ..models import xychart
 from . import runtime as cogruntime
 
 
diff --git a/python/grafana_foundation_sdk/models/annotationslist.py b/python/grafana_foundation_sdk/models/annotationslist.py
index 226c0b2..c00b892 100644
--- a/python/grafana_foundation_sdk/models/annotationslist.py
+++ b/python/grafana_foundation_sdk/models/annotationslist.py
@@ -1,7 +1,7 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import runtime as cogruntime
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/azuremonitor.py b/python/grafana_foundation_sdk/models/azuremonitor.py
index 12740da..aa47755 100644
--- a/python/grafana_foundation_sdk/models/azuremonitor.py
+++ b/python/grafana_foundation_sdk/models/azuremonitor.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-from ..cog import variants as cogvariants
-import typing
 from ..cog import runtime as cogruntime
+from ..cog import variants as cogvariants
 import enum
+import typing
 
 
 class AzureMonitorQuery(cogvariants.Dataquery):
diff --git a/python/grafana_foundation_sdk/models/barchart.py b/python/grafana_foundation_sdk/models/barchart.py
index 55e37f7..ccf89c6 100644
--- a/python/grafana_foundation_sdk/models/barchart.py
+++ b/python/grafana_foundation_sdk/models/barchart.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..models import common
 from ..cog import runtime as cogruntime
+from ..models import common
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/bargauge.py b/python/grafana_foundation_sdk/models/bargauge.py
index 2a70aeb..22e0d36 100644
--- a/python/grafana_foundation_sdk/models/bargauge.py
+++ b/python/grafana_foundation_sdk/models/bargauge.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/candlestick.py b/python/grafana_foundation_sdk/models/candlestick.py
index 2456174..96a248e 100644
--- a/python/grafana_foundation_sdk/models/candlestick.py
+++ b/python/grafana_foundation_sdk/models/candlestick.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
+from ..models import common
 import enum
 import typing
-from ..models import common
-from ..cog import runtime as cogruntime
 
 
 class VizDisplayMode(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/canvas.py b/python/grafana_foundation_sdk/models/canvas.py
index 75d5397..f519aaf 100644
--- a/python/grafana_foundation_sdk/models/canvas.py
+++ b/python/grafana_foundation_sdk/models/canvas.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
+from ..models import common
 import enum
 import typing
-from ..models import common
-from ..cog import runtime as cogruntime
 
 
 class HorizontalConstraint(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/cloudwatch.py b/python/grafana_foundation_sdk/models/cloudwatch.py
index b2cfd7b..10ec49c 100644
--- a/python/grafana_foundation_sdk/models/cloudwatch.py
+++ b/python/grafana_foundation_sdk/models/cloudwatch.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
+from ..cog import runtime as cogruntime
 from ..cog import variants as cogvariants
 import enum
-from ..cog import runtime as cogruntime
+import typing
 
 
 class MetricStat:
@@ -894,7 +894,7 @@ CloudWatchQuery = typing.Union['CloudWatchMetricsQuery', 'CloudWatchLogsQuery',
 
 
 def variant_config() -> cogruntime.DataqueryConfig:
-    decoding_map: dict[str, typing.Union[typing.Type[CloudWatchMetricsQuery], typing.Type[CloudWatchLogsQuery], typing.Type[CloudWatchAnnotationQuery]]] = {"Metrics": CloudWatchMetricsQuery, "Logs": CloudWatchLogsQuery, "Annotations": CloudWatchAnnotationQuery}
+    decoding_map: dict[str, typing.Union[typing.Type[CloudWatchLogsQuery], typing.Type[CloudWatchAnnotationQuery], typing.Type[CloudWatchMetricsQuery]]] = {"Logs": CloudWatchLogsQuery, "Annotations": CloudWatchAnnotationQuery, "Metrics": CloudWatchMetricsQuery}
     return cogruntime.DataqueryConfig(
         identifier="cloudwatch",
         from_json_hook=lambda data: decoding_map[data["queryMode"]].from_json(data),
diff --git a/python/grafana_foundation_sdk/models/common.py b/python/grafana_foundation_sdk/models/common.py
index 76cd961..10eb4ca 100644
--- a/python/grafana_foundation_sdk/models/common.py
+++ b/python/grafana_foundation_sdk/models/common.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
+from ..cog import variants as cogvariants
 import enum
 import typing
-from ..cog import variants as cogvariants
-from ..cog import runtime as cogruntime
 
 
 class DataTopic(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/dashboard.py b/python/grafana_foundation_sdk/models/dashboard.py
index c0bed81..0a12f0a 100644
--- a/python/grafana_foundation_sdk/models/dashboard.py
+++ b/python/grafana_foundation_sdk/models/dashboard.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-import enum
-from ..cog import variants as cogvariants
 from ..cog import runtime as cogruntime
+from ..cog import variants as cogvariants
+import enum
+import typing
 
 
 class Dashboard:
diff --git a/python/grafana_foundation_sdk/models/dashboardlist.py b/python/grafana_foundation_sdk/models/dashboardlist.py
index f726155..d1fc711 100644
--- a/python/grafana_foundation_sdk/models/dashboardlist.py
+++ b/python/grafana_foundation_sdk/models/dashboardlist.py
@@ -1,7 +1,7 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import runtime as cogruntime
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/datagrid.py b/python/grafana_foundation_sdk/models/datagrid.py
index 35e0fae..982f4b1 100644
--- a/python/grafana_foundation_sdk/models/datagrid.py
+++ b/python/grafana_foundation_sdk/models/datagrid.py
@@ -1,7 +1,7 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import runtime as cogruntime
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/debug.py b/python/grafana_foundation_sdk/models/debug.py
index 4245a37..b106408 100644
--- a/python/grafana_foundation_sdk/models/debug.py
+++ b/python/grafana_foundation_sdk/models/debug.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-import enum
 from ..cog import runtime as cogruntime
+import enum
+import typing
 
 
 class UpdateConfig:
diff --git a/python/grafana_foundation_sdk/models/elasticsearch.py b/python/grafana_foundation_sdk/models/elasticsearch.py
index cf4c145..53421c3 100644
--- a/python/grafana_foundation_sdk/models/elasticsearch.py
+++ b/python/grafana_foundation_sdk/models/elasticsearch.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-import enum
-from ..cog import variants as cogvariants
 from ..cog import runtime as cogruntime
+from ..cog import variants as cogvariants
+import enum
+import typing
 
 
 BucketAggregation = typing.Union['DateHistogram', 'Histogram', 'Terms', 'Filters', 'GeoHashGrid', 'Nested']
diff --git a/python/grafana_foundation_sdk/models/gauge.py b/python/grafana_foundation_sdk/models/gauge.py
index 5d60687..482ae03 100644
--- a/python/grafana_foundation_sdk/models/gauge.py
+++ b/python/grafana_foundation_sdk/models/gauge.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/geomap.py b/python/grafana_foundation_sdk/models/geomap.py
index 81f9e9f..5fda896 100644
--- a/python/grafana_foundation_sdk/models/geomap.py
+++ b/python/grafana_foundation_sdk/models/geomap.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
-import typing
 import enum
-from ..cog import runtime as cogruntime
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/googlecloudmonitoring.py b/python/grafana_foundation_sdk/models/googlecloudmonitoring.py
index 0157038..830ba7e 100644
--- a/python/grafana_foundation_sdk/models/googlecloudmonitoring.py
+++ b/python/grafana_foundation_sdk/models/googlecloudmonitoring.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-from ..cog import variants as cogvariants
-import typing
 from ..cog import runtime as cogruntime
+from ..cog import variants as cogvariants
 import enum
+import typing
 
 
 class CloudMonitoringQuery(cogvariants.Dataquery):
diff --git a/python/grafana_foundation_sdk/models/grafanapyroscope.py b/python/grafana_foundation_sdk/models/grafanapyroscope.py
index c047f85..19d06d0 100644
--- a/python/grafana_foundation_sdk/models/grafanapyroscope.py
+++ b/python/grafana_foundation_sdk/models/grafanapyroscope.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import enum
+from ..cog import runtime as cogruntime
 from ..cog import variants as cogvariants
+import enum
 import typing
-from ..cog import runtime as cogruntime
 
 
 class PyroscopeQueryType(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/heatmap.py b/python/grafana_foundation_sdk/models/heatmap.py
index 1a9a40b..d8ce829 100644
--- a/python/grafana_foundation_sdk/models/heatmap.py
+++ b/python/grafana_foundation_sdk/models/heatmap.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
+from ..models import common
 import enum
 import typing
-from ..models import common
-from ..cog import runtime as cogruntime
 
 
 class HeatmapColorMode(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/histogram.py b/python/grafana_foundation_sdk/models/histogram.py
index 7101b10..ea1d79c 100644
--- a/python/grafana_foundation_sdk/models/histogram.py
+++ b/python/grafana_foundation_sdk/models/histogram.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..models import common
 from ..cog import runtime as cogruntime
+from ..models import common
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/librarypanel.py b/python/grafana_foundation_sdk/models/librarypanel.py
index b889289..e87ef51 100644
--- a/python/grafana_foundation_sdk/models/librarypanel.py
+++ b/python/grafana_foundation_sdk/models/librarypanel.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
+from ..cog import runtime as cogruntime
 from ..cog import variants as cogvariants
 from ..models import dashboard
-from ..cog import runtime as cogruntime
+import typing
 
 
 class LibraryPanel:
diff --git a/python/grafana_foundation_sdk/models/logs.py b/python/grafana_foundation_sdk/models/logs.py
index 43031ff..ab409e2 100644
--- a/python/grafana_foundation_sdk/models/logs.py
+++ b/python/grafana_foundation_sdk/models/logs.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/loki.py b/python/grafana_foundation_sdk/models/loki.py
index 0862cea..2c4bd53 100644
--- a/python/grafana_foundation_sdk/models/loki.py
+++ b/python/grafana_foundation_sdk/models/loki.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import enum
+from ..cog import runtime as cogruntime
 from ..cog import variants as cogvariants
+import enum
 import typing
-from ..cog import runtime as cogruntime
 
 
 class QueryEditorMode(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/news.py b/python/grafana_foundation_sdk/models/news.py
index f19fd38..17d42ca 100644
--- a/python/grafana_foundation_sdk/models/news.py
+++ b/python/grafana_foundation_sdk/models/news.py
@@ -1,7 +1,7 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import runtime as cogruntime
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/nodegraph.py b/python/grafana_foundation_sdk/models/nodegraph.py
index e660338..06806fd 100644
--- a/python/grafana_foundation_sdk/models/nodegraph.py
+++ b/python/grafana_foundation_sdk/models/nodegraph.py
@@ -1,7 +1,7 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
 from ..cog import runtime as cogruntime
+import typing
 
 
 class ArcOption:
diff --git a/python/grafana_foundation_sdk/models/parca.py b/python/grafana_foundation_sdk/models/parca.py
index 1c34457..1445fe6 100644
--- a/python/grafana_foundation_sdk/models/parca.py
+++ b/python/grafana_foundation_sdk/models/parca.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import enum
+from ..cog import runtime as cogruntime
 from ..cog import variants as cogvariants
+import enum
 import typing
-from ..cog import runtime as cogruntime
 
 
 class ParcaQueryType(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/piechart.py b/python/grafana_foundation_sdk/models/piechart.py
index 3a1126e..141d3ae 100644
--- a/python/grafana_foundation_sdk/models/piechart.py
+++ b/python/grafana_foundation_sdk/models/piechart.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import enum
+from ..cog import runtime as cogruntime
 from ..models import common
+import enum
 import typing
-from ..cog import runtime as cogruntime
 
 
 class PieChartType(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/prometheus.py b/python/grafana_foundation_sdk/models/prometheus.py
index d405749..306e73b 100644
--- a/python/grafana_foundation_sdk/models/prometheus.py
+++ b/python/grafana_foundation_sdk/models/prometheus.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import enum
+from ..cog import runtime as cogruntime
 from ..cog import variants as cogvariants
+import enum
 import typing
-from ..cog import runtime as cogruntime
 
 
 class QueryEditorMode(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/rolebinding.py b/python/grafana_foundation_sdk/models/rolebinding.py
index eafa911..e8f302c 100644
--- a/python/grafana_foundation_sdk/models/rolebinding.py
+++ b/python/grafana_foundation_sdk/models/rolebinding.py
@@ -25,7 +25,7 @@ class RoleBinding:
         args: dict[str, typing.Any] = {}
         
         if "role" in data:
-            decoding_map: dict[str, typing.Union[typing.Type[CustomRoleRef], typing.Type[BuiltinRoleRef]]] = {"Role": CustomRoleRef, "BuiltinRole": BuiltinRoleRef}
+            decoding_map: dict[str, typing.Union[typing.Type[BuiltinRoleRef], typing.Type[CustomRoleRef]]] = {"BuiltinRole": BuiltinRoleRef, "Role": CustomRoleRef}
             args["role"] = decoding_map[data["role"]["kind"]].from_json(data["role"])
         if "subject" in data:
             args["subject"] = RoleBindingSubject.from_json(data["subject"])        
diff --git a/python/grafana_foundation_sdk/models/stat.py b/python/grafana_foundation_sdk/models/stat.py
index a713ab1..afe6e62 100644
--- a/python/grafana_foundation_sdk/models/stat.py
+++ b/python/grafana_foundation_sdk/models/stat.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/statetimeline.py b/python/grafana_foundation_sdk/models/statetimeline.py
index cd67ac6..f25c6a0 100644
--- a/python/grafana_foundation_sdk/models/statetimeline.py
+++ b/python/grafana_foundation_sdk/models/statetimeline.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/statushistory.py b/python/grafana_foundation_sdk/models/statushistory.py
index c853f18..85ba9fa 100644
--- a/python/grafana_foundation_sdk/models/statushistory.py
+++ b/python/grafana_foundation_sdk/models/statushistory.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/table.py b/python/grafana_foundation_sdk/models/table.py
index fd8e600..d0b2583 100644
--- a/python/grafana_foundation_sdk/models/table.py
+++ b/python/grafana_foundation_sdk/models/table.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-import typing
-from ..models import common
 from ..cog import runtime as cogruntime
+from ..models import common
+import typing
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/tempo.py b/python/grafana_foundation_sdk/models/tempo.py
index 4b44821..2c64604 100644
--- a/python/grafana_foundation_sdk/models/tempo.py
+++ b/python/grafana_foundation_sdk/models/tempo.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
-from ..cog import variants as cogvariants
-import typing
 from ..cog import runtime as cogruntime
+from ..cog import variants as cogvariants
 import enum
+import typing
 
 
 class TempoQuery(cogvariants.Dataquery):
diff --git a/python/grafana_foundation_sdk/models/text.py b/python/grafana_foundation_sdk/models/text.py
index a133bf8..db9d8fe 100644
--- a/python/grafana_foundation_sdk/models/text.py
+++ b/python/grafana_foundation_sdk/models/text.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 import enum
 import typing
-from ..cog import runtime as cogruntime
 
 
 class TextMode(enum.StrEnum):
diff --git a/python/grafana_foundation_sdk/models/timeseries.py b/python/grafana_foundation_sdk/models/timeseries.py
index 32fcacb..d711e40 100644
--- a/python/grafana_foundation_sdk/models/timeseries.py
+++ b/python/grafana_foundation_sdk/models/timeseries.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/trend.py b/python/grafana_foundation_sdk/models/trend.py
index 0425002..0750d93 100644
--- a/python/grafana_foundation_sdk/models/trend.py
+++ b/python/grafana_foundation_sdk/models/trend.py
@@ -1,8 +1,8 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
 from ..models import common
 import typing
-from ..cog import runtime as cogruntime
 
 
 class Options:
diff --git a/python/grafana_foundation_sdk/models/xychart.py b/python/grafana_foundation_sdk/models/xychart.py
index 62b4ea0..4e0f469 100644
--- a/python/grafana_foundation_sdk/models/xychart.py
+++ b/python/grafana_foundation_sdk/models/xychart.py
@@ -1,9 +1,9 @@
 # Code generated - EDITING IS FUTILE. DO NOT EDIT.
 
+from ..cog import runtime as cogruntime
+from ..models import common
 import enum
 import typing
-from ..models import common
-from ..cog import runtime as cogruntime
 
 
 class SeriesMapping(enum.StrEnum):
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 74cafc4..8e46892 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -13,7 +13,7 @@ keywords = [
     "traces",
     "metrics"
 ]
-version = "1712096377!next"
+version = "1712150724!next"
 dependencies = []
 requires-python = ">=3.11"
 classifiers = [
diff --git a/typescript/package.json b/typescript/package.json
index 66aa395..f80bc63 100644
--- a/typescript/package.json
+++ b/typescript/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@grafana/grafana-foundation-sdk",
-  "version": "next-cogv0.0.x.1712096377",
+  "version": "next-cogv0.0.x.1712150724",
   "description": "A set of tools, types and libraries for building and manipulating Grafana objects.",
   "keywords": [
     "observability",

@julienduchesne
Copy link
Member

It is indeed sorted by the import name, but that's not the standard python way to sort imports

Here's an example of how it should be sorted (as isort sorts them):

# future imports
from __future__ import annotations

# standard library
import re
import sys
from datetime import date, datetime, timedelta
from pathlib import Path
from unittest import expectedFailure, TestCase, skip

# third-party
import requests
from attr import dataclasses
from honesty.api import download_many

# first-party
from something import other_function, some_function
from . import some_module
from .other_module import SomeClass, some_thing, TestFixture

It's sorted: type of import -> import lib -> imported symbol

Copy link
Member

@julienduchesne julienduchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting to remove the review request (posted my previous comment in the wrong place) 😄. Re-request review when ready!

@K-Phoen K-Phoen marked this pull request as draft May 6, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants