Bump version, fix models and add new route#10
Merged
sm1ky merged 6 commits intoproductionfrom Sep 16, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Python SDK to use modern union syntax and adds a new HWID deletion endpoint. The changes improve code consistency by migrating from Optional[T] to T | None syntax and fix type annotations for better precision.
- Replace
Optional[T]withT | Noneunion syntax throughout user models - Update type annotations from
floattointfor count fields in HWID models - Add new endpoint for deleting all HWID devices for a user
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| remnawave/models/users.py | Modernizes type annotations using union syntax and removes unused imports |
| remnawave/models/hwid.py | Fixes type annotations for count fields and removes trailing whitespace |
| remnawave/controllers/hwid.py | Adds new endpoint for bulk HWID device deletion |
| pyproject.toml | Updates version to include post-release identifier |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| first_connected: Optional[datetime] = Field(None, alias="firstConnectedAt") | ||
| last_trigger_threshold: Optional[int] = Field(None, alias="lastTriggeredThreshold") | ||
| last_connected_node: Optional[UserLastConnectedNodeDto] = Field( | ||
| subscription_url: str | None = Field(None, alias="subscriptionUrl") |
There was a problem hiding this comment.
The subscription_url field type changed from str (required) to str | None (optional). This is a breaking change that could cause issues for consumers expecting this field to always be present.
Suggested change
| subscription_url: str | None = Field(None, alias="subscriptionUrl") | |
| subscription_url: str = Field(alias="subscriptionUrl") |
…я статистики HWID и удаления всех устройств пользователя
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.
No description provided.