Skip to content

Commit 0911644

Browse files
authored
Improve typing (#42596)
* Replace kwargs with optional params * Update polling parameter type to use PollingMethod in PhoneNumbersClient * Remove extra spaces * Set default quantity to 1 if not provided in PhoneNumbersClient * Update recordings to add quantity * Fix recordings * Remove x-ms-user-agent * Fix pylint errors * Reorganize TYPE_CHECKING imports for consistency * Refactor search request creation to use kwargs for improved readability * Revert recording changes * Refactor PhoneNumberSearchRequest creation for improved clarity and maintainability * Refactor PhoneNumberSearchRequest creation to simplify logic and improve readability * Remove quantity from recordings * Revert to recordings quith quantity * Remove unnecessary blank lines in PhoneNumbersClient search request methods * Update recordings * Update recordings * Update recordings * add changelog entry * refactor: simplify return statement in list_phone_numbers method * changelog: update release history for version 1.4.1 * changelog: update release history for version 1.4.1 * changelog: correct version header and format for 1.4.1 release * changelog: fix format * refactor: remove unnecessary cast in phone number listing methods * changelog: update release history for version 1.5.0 * bump version to 1.5.0
1 parent 89f8e9f commit 0911644

File tree

5 files changed

+258
-110
lines changed

5 files changed

+258
-110
lines changed

sdk/communication/azure-communication-phonenumbers/CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Release History
22

3+
## 1.5.0 (Unreleased)
4+
- Improved type safety and consistency across all client methods
5+
6+
### Other Changes
7+
- Replaced `**kwargs` parameters with explicit typed parameters for better IDE support and type checking
8+
- Enhanced type annotations for Long Running Operation (LRO) methods with proper `Union[bool, "PollingMethod"]` typing
9+
- Fixed type compatibility issues with optional parameters (e.g., `quantity` in search operations)
10+
- Added proper type hints for all method parameters while maintaining backward compatibility
11+
- Fixed pylint and mypy compliance issues
12+
- Improved code organization and import structure
13+
314
## 1.4.0 (2025-08-28)
415

516
### Features Added
@@ -34,7 +45,7 @@
3445
- GA release of Number Insight.
3546
- API version `2025-02-11` is the default.
3647

37-
## Other changes
48+
### Other Changes
3849
- Updated `search_operator_information` method signature to enforce `options` as a keyword-only argument.
3950

4051
## 1.2.0b2 (2024-03-01)

sdk/communication/azure-communication-phonenumbers/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/communication/azure-communication-phonenumbers",
5-
"Tag": "python/communication/azure-communication-phonenumbers_ee055c0573"
5+
"Tag": "python/communication/azure-communication-phonenumbers_157feff6af"
66
}

0 commit comments

Comments
 (0)