-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2024] Code quality fixes #266
Merged
Merged
Conversation
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
jsongerber
pushed a commit
to jsongerber/python-sagemcom-api
that referenced
this pull request
Nov 8, 2024
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.
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.
This pull request includes various changes to improve the
sagemcom_api
codebase. The most important changes include adding flexibility in initializing theDevice
class, modifying theEncryptionMethod
enum class to ensure uniqueness of values, and removing unused imports and code blocks in thesagemcom_api/client.py
file.Main functionality changes:
sagemcom_api/models.py
: Added flexibility in initializing theDevice
class, removed unused attributes, modified attribute values, and updated type annotations. [1] [2] [3] [4] [5] [6] [7]sagemcom_api/enums.py
: Modified theEncryptionMethod
enum class to use theStrEnum
class and ensure uniqueness of values.sagemcom_api/client.py
: Removed unused imports, modified headers and parameters, updated type annotations, added comments, and removed code blocks. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Other changes:
pyproject.toml
: Addedbackports-strenum
package as a dependency for Python versions lower than 3.11.sagemcom_api/__init__.py
: Removed the unused__version__
variable.setup.cfg
: Added ignore rule forE501
error code inflake8
linting.tests/test_sagemcom.py
: Removed thetest_version
function as it was no longer needed.sagemcom_api/exceptions.py
: Removedpass
statements from several exception classes.