-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This pull request includes various changes to improve the `sagemcom_api` codebase. The most important changes include adding flexibility in initializing the `Device` class, modifying the `EncryptionMethod` enum class to ensure uniqueness of values, and removing unused imports and code blocks in the `sagemcom_api/client.py` file. Main functionality changes: * [`sagemcom_api/models.py`](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34L106-R129): Added flexibility in initializing the `Device` class, removed unused attributes, modified attribute values, and updated type annotations. [[1]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34L106-R129) [[2]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34R51-R58) [[3]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34R8) [[4]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34R71) [[5]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34L97) [[6]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34L80-L82) [[7]](diffhunk://#diff-1f5ad46f1c332379d35609bca9ea626894e97d6e40c47cfb5cbe83d2c4258c34R154-R161) * [`sagemcom_api/enums.py`](diffhunk://#diff-696d324cfc32d09ae617a7597df251392c35ae1c07be0c0eb30e87d4142937c8R2-R14): Modified the `EncryptionMethod` enum class to use the `StrEnum` class and ensure uniqueness of values. * [`sagemcom_api/client.py`](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L10-L17): Removed unused imports, modified headers and parameters, updated type annotations, added comments, and removed code blocks. [[1]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L10-L17) [[2]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L84-R88) [[3]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L340-R340) [[4]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L215-R216) [[5]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L328-R327) [[6]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L365-R364) [[7]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L392-R391) [[8]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L193) [[9]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L381-R380) [[10]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L354-R353) [[11]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L282-R283) [[12]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L295-R296) [[13]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L96-R100) [[14]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5L308-R315) [[15]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R44-R59) Other changes: * [`pyproject.toml`](diffhunk://#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R23): Added `backports-strenum` package as a dependency for Python versions lower than 3.11. * [`sagemcom_api/__init__.py`](diffhunk://#diff-43f61fbb6f1f76bed40f65c0d68f581efef61f6684219f1afc7363a60be0f336L2): Removed the unused `__version__` variable. * [`setup.cfg`](diffhunk://#diff-fa602a8a75dc9dcc92261bac5f533c2a85e34fcceaff63b3a3a81d9acde2fc52R1-R5): Added ignore rule for `E501` error code in `flake8` linting. * [`tests/test_sagemcom.py`](diffhunk://#diff-0f905eca51ada7d34dc2d2978c6c41945cf4a8179cb58bcb446219f97d335aaeL2-L8): Removed the `test_version` function as it was no longer needed. * [`sagemcom_api/exceptions.py`](diffhunk://#diff-63c847110513149341a9f7e94d412bfb7c67d79df07a321774a9a2f3329ca34fL8-L58): Removed `pass` statements from several exception classes.
- Loading branch information
Showing
10 changed files
with
77 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Ensure Docker script files uses LF to support Docker for Windows. | ||
# Ensure "git config --global core.autocrlf input" before you clone | ||
* text eol=lf | ||
*.py whitespace=error | ||
*.py whitespace=error |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
"""Package to communicate with Sagemcom F@st internal APIs.""" | ||
__version__ = "1.0.1" |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.