Skip to content

Commit a4516d7

Browse files
author
Johan Broberg
committed
Enable linting, fix copyright header validation, auto-fix linting errors.
1 parent 40d68b6 commit a4516d7

File tree

26 files changed

+68
-56
lines changed

26 files changed

+68
-56
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ jobs:
109109
- name: Check linting
110110
run: |
111111
uv run --frozen ruff check .
112-
continue-on-error: true
113112
114113
- name: Check formatting
115114
run: |

generate_dependency_diagram.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import re
1010
import tomllib
1111
from pathlib import Path
12-
from typing import Dict, List, Set
1312

1413

1514
class PackageInfo:
@@ -19,16 +18,16 @@ def __init__(self, name: str, package_type: str, path: Path):
1918
self.name = name
2019
self.package_type = package_type
2120
self.path = path
22-
self.dependencies: Set[str] = set()
21+
self.dependencies: set[str] = set()
2322

2423

25-
def read_pyproject_toml(path: Path) -> Dict:
24+
def read_pyproject_toml(path: Path) -> dict:
2625
"""Read and parse a pyproject.toml file."""
2726
with open(path, "rb") as f:
2827
return tomllib.load(f)
2928

3029

31-
def extract_dependencies(pyproject_data: Dict, package_names: Set[str]) -> Set[str]:
30+
def extract_dependencies(pyproject_data: dict, package_names: set[str]) -> set[str]:
3231
"""Extract internal package dependencies from pyproject.toml data."""
3332
dependencies = set()
3433

@@ -45,7 +44,7 @@ def extract_dependencies(pyproject_data: Dict, package_names: Set[str]) -> Set[s
4544
return dependencies
4645

4746

48-
def generate_mermaid_diagram(packages: List[PackageInfo]) -> str:
47+
def generate_mermaid_diagram(packages: list[PackageInfo]) -> str:
4948
"""Generate a Mermaid diagram from package information."""
5049

5150
# Color scheme based on package types
@@ -96,7 +95,7 @@ def generate_mermaid_diagram(packages: List[PackageInfo]) -> str:
9695
lines.append(" %% Styling")
9796

9897
# Group packages by type for styling
99-
packages_by_type: Dict[str, List[str]] = {}
98+
packages_by_type: dict[str, list[str]] = {}
10099
for pkg in packages:
101100
if pkg.package_type not in packages_by_type:
102101
packages_by_type[pkg.package_type] = []
@@ -170,8 +169,8 @@ def main():
170169

171170
# Collect all package names first and cache pyproject data
172171
all_package_names = set()
173-
packages: List[PackageInfo] = []
174-
pyproject_data_cache: Dict[str, Dict] = {}
172+
packages: list[PackageInfo] = []
173+
pyproject_data_cache: dict[str, dict] = {}
175174

176175
for path_str, pkg_type in package_configs:
177176
pyproject_path = repo_root / path_str / "pyproject.toml"

libraries/microsoft-agents-a365-observability-hosting/microsoft_agents_a365/observability/hosting/scope_helpers/populate_baggage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
from __future__ import annotations
25

36
from collections.abc import Iterator

libraries/microsoft-agents-a365-observability-hosting/microsoft_agents_a365/observability/hosting/scope_helpers/populate_invoke_agent_scope.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
from __future__ import annotations
25

36
from typing import TYPE_CHECKING

libraries/microsoft-agents-a365-tooling-extensions-semantickernel/microsoft_agents_a365/tooling/extensions/semantickernel/services/mcp_tool_registration_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from microsoft_agents_a365.tooling.services.mcp_tool_server_configuration_service import (
2121
McpToolServerConfigurationService,
2222
)
23-
from microsoft_agents_a365.tooling.models import MCPServerConfig, ToolOptions
23+
from microsoft_agents_a365.tooling.models import ToolOptions
2424
from microsoft_agents_a365.tooling.utils.constants import Constants
2525
from microsoft_agents_a365.tooling.utils.utility import (
2626
get_mcp_platform_authentication_scope,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ exclude = [
113113

114114
[tool.ruff.lint.flake8-copyright]
115115
# Require this exact copyright header (matches CLAUDE.md specification)
116-
notice-rgx = "(?s)# Copyright \\(c\\) Microsoft Corporation\\.\\n# Licensed under the MIT License\\."
116+
notice-rgx = "# Copyright \\(c\\) Microsoft Corporation\\.\\r?\\n# Licensed under the MIT License\\."
117117
# (optional) ensure all files are checked regardless of size
118118
min-file-size = 1
119119

tests/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
# Copyright (c) Microsoft. All rights reserved.
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.

tests/observability/core/exporters/test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (c) Microsoft. All rights reserved.
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
23

34
import os
45
import unittest

tests/observability/core/test_agent365_exporter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (c) Microsoft. All rights reserved.
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
23

34
import json
45
import os

tests/observability/core/test_baggage_builder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (c) Microsoft. All rights reserved.
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
23

34

45
import os

0 commit comments

Comments
 (0)