Fix alias detection, docstring references, and GUID validation#98
Merged
rhythmatician merged 15 commits intomasterfrom Feb 12, 2026
Merged
Fix alias detection, docstring references, and GUID validation#98rhythmatician merged 15 commits intomasterfrom
rhythmatician merged 15 commits intomasterfrom
Conversation
…bols - Introduced a new module to manage deprecated symbols within the SDK. - Implemented a mechanism to discover and warn about deprecated symbols at runtime. - Added regex-based parsing to identify deprecated messages in module files. - Enhanced the `__getattr__` and `__dir__` methods to support dynamic loading of deprecated symbols.
…tsToUpdateMeasurementSetResponseModel
…AssetServiceRecordResponseModel
…warnings (#97) * Initial plan * Fix deprecated module imports in non-deprecated model files Updated 12 model files to import from non-deprecated modules instead of deprecated ones. All imports now use aliased imports to maintain backward compatibility while using the correct source modules. Files fixed: - Asset forecast, maintenance plan, and response models - Client asset and sponsored client models - Environment models - Measurement set models - Report dataset measurement models - Service order models Co-authored-by: rhythmatician <75549255+rhythmatician@users.noreply.github.com> * chore: remove trailing whitespace Co-authored-by: rhythmatician <75549255+rhythmatician@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rhythmatician <75549255+rhythmatician@users.noreply.github.com>
…ighten alias regex, fix GUID parsing Co-authored-by: rhythmatician <75549255+rhythmatician@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Move deprecated models to dedicated subdirectory and add dynamic handling
Fix alias detection, docstring references, and GUID validation
Feb 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes several API-surface and validation issues: prevent unintended TypeVar exports, refresh stale docstring type references, remove unused imports, and tighten GUID parsing behavior.
Changes:
- Tightened alias detection regex in
models/__init__.pyto only exportName = OtherNamealiases. - Updated
MeasurementsToUpdateMeasurementSetResponseModeldocstring to referenceInfluenceParameterType. - Removed unused import(s) in deprecated model package init.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/qualer_sdk/models/init.py | Narrows alias detection so only valid class-to-class aliases contribute to __all__. |
| src/qualer_sdk/models/qualer_api_models_measurements_to_update_measurement_set_response_model.py | Updates docstring type references to the current InfluenceParameterType. |
| src/qualer_sdk/models/deprecated/init.py | Removes an unused warnings import to reduce clutter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses four issues from PR review feedback: TypeVar pollution in package exports, stale deprecated type references in docstrings, unused imports, and permissive GUID parsing.
Changes
Tightened alias detection regex in
models/__init__.pyto match onlyName = OtherNamepatterns, excludingT = TypeVar(...)and function calls. Prevents internal TypeVars from being exported via__all__.Updated MeasurementsToUpdateMeasurementSetResponseModel docstring to reference
InfluenceParameterTypeinstead of deprecatedMeasurementsToUpdateMeasurementSetResponseModelInfluenceParameter1Type/2Type.Removed unused
warningsimport andreplacementvariable indeprecated/__init__.py.Fixed
_parse_guid()in AssetServiceRecordsToAssetServiceRecordResponseModel to returnNoneon parse failure instead of casting invalid input, enabling proper validation rejection of malformed GUIDs.Example
Before the regex fix:
After:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.