Skip to content

Commit b136c21

Browse files
committed
Formatting
1 parent b5f78d9 commit b136c21

File tree

9 files changed

+25
-29
lines changed

9 files changed

+25
-29
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,12 @@ jobs:
4343
APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING: https://ade.applicationinsights.io/subscriptions/12534eb3-8109-4d84-83ad-576c0d5e1d06/resourcegroups/clients_e2e_test/providers/microsoft.insights/components/kusto-e2e-app-insights
4444
APPLICATION_INSIGHTS_TEST_DATABASE: kusto-e2e-app-insights
4545
run: uvx poe test --ci
46-
47-
# todo: re-enable on a different PR
48-
# - name: "Run Ruff Formatter"
49-
# id: ruff-formatter
50-
# uses: astral-sh/ruff-action@v3
51-
# with:
52-
# args: "format --diff"
53-
#
54-
# - name: "Run Ruff Linter"
55-
# run: ruff check --diff
46+
47+
- name: "Run Ruff Formatter"
48+
run: uvx poe check-format
49+
50+
- name: "Run Ruff Linter"
51+
run: uvx poe lint
5652

5753
- name: Upload Unit Test Results
5854
if: always()

azure-kusto-data/azure/kusto/data/exceptions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ class KustoError(Exception):
1919
"""Base class for all exceptions raised by the Kusto Python Client Libraries."""
2020

2121

22-
class KustoStreamingQueryError(KustoError):
23-
...
22+
class KustoStreamingQueryError(KustoError): ...
2423

2524

26-
class KustoTokenParsingError(KustoStreamingQueryError):
27-
...
25+
class KustoTokenParsingError(KustoStreamingQueryError): ...
2826

2927

3028
SEMANTIC_ERROR_STRING = "Semantic error:"

azure-kusto-data/azure/kusto/data/kusto_trusted_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def validate_hostname_is_trusted(self, hostname: str, login_endpoint: str):
9595
return
9696

9797
raise KustoClientInvalidConnectionStringException(
98-
f"Can't communicate with '{hostname}' as this hostname is currently not trusted; please see " f"https://aka.ms/kustotrustedendpoints"
98+
f"Can't communicate with '{hostname}' as this hostname is currently not trusted; please see https://aka.ms/kustotrustedendpoints"
9999
)
100100

101101
def set_override_policy(self, matcher):

azure-kusto-data/tests/aio/test_kusto_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for KustoClient."""
2+
23
import json
34
import sys
45
from unittest.mock import patch

azure-kusto-data/tests/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
1+
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License
33
"""A simple example how to use KustoClient."""
44

azure-kusto-data/tests/test_kusto_connection_string_builder.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,18 @@ def test_aad_app(self):
8181
assert kcsb.application_client_id == uuid
8282
assert kcsb.application_key == key
8383
assert kcsb.authority_id == "microsoft.com"
84-
assert repr(
85-
kcsb
86-
) == "Data Source=localhost;Initial Catalog=NetDefaultDB;AAD Federated Security=True;Application Client Id={0};Application Key={1};Authority Id={2}".format(
87-
uuid, key, "microsoft.com"
84+
assert (
85+
repr(kcsb)
86+
== "Data Source=localhost;Initial Catalog=NetDefaultDB;AAD Federated Security=True;Application Client Id={0};Application Key={1};Authority Id={2}".format(
87+
uuid, key, "microsoft.com"
88+
)
8889
)
8990

90-
assert str(
91-
kcsb
92-
) == "Data Source=localhost;Initial Catalog=NetDefaultDB;AAD Federated Security=True;Application Client Id={0};Application Key={1};Authority Id={2}".format(
93-
uuid, self.PASSWORDS_REPLACEMENT, "microsoft.com"
91+
assert (
92+
str(kcsb)
93+
== "Data Source=localhost;Initial Catalog=NetDefaultDB;AAD Federated Security=True;Application Client Id={0};Application Key={1};Authority Id={2}".format(
94+
uuid, self.PASSWORDS_REPLACEMENT, "microsoft.com"
95+
)
9496
)
9597

9698
def test_aad_user(self):

azure-kusto-ingest/azure/kusto/ingest/exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def __init__(self, expected_service_type, actual_service_type, suggested_endpoin
3737

3838

3939
class KustoQueueError(KustoClientError):
40-
4140
"""Raised when not succeeding to upload message to queue in all retries"""
4241

4342
def __init__(self):

azure-kusto-ingest/tests/test_kusto_streaming_ingest_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ def test_streaming_ingest_from_stream(self, ingest_client_class):
194194
assert result.status == IngestionStatus.SUCCESS
195195

196196
def test_client_uri_from_query_endpoint(self):
197-
assert (
198-
KustoStreamingIngestClient("https://somecluster.kusto.windows.net")._kusto_client._kusto_cluster == "https://somecluster.kusto.windows.net/"
199-
), "Client URI was not extracted correctly from query endpoint"
197+
assert KustoStreamingIngestClient("https://somecluster.kusto.windows.net")._kusto_client._kusto_cluster == "https://somecluster.kusto.windows.net/", (
198+
"Client URI was not extracted correctly from query endpoint"
199+
)
200200

201201
def test_client_uri_from_ingestion_endpoint(self):
202202
assert (

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ sync = "uv sync --all-packages --all-extras --dev --locked"
5858
build = "uv build --all-packages"
5959
format = "ruff format"
6060
check-format = "ruff format --diff"
61-
lint = "ruff check"
61+
lint = "ruff check --diff"
6262
lint-fix = "ruff check --fix"
6363
lint-fix-unsafe = "ruff check --fix --unsafe-fixes"
6464
show-version = "uv version"

0 commit comments

Comments
 (0)