Skip to content
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 7 commits into from
Jan 7, 2024
Merged

[2024] Code quality fixes #266

merged 7 commits into from
Jan 7, 2024

Conversation

iMicknl
Copy link
Owner

@iMicknl iMicknl commented Jan 7, 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:

Other changes:

@github-actions github-actions bot added the bug Something isn't working label Jan 7, 2024
@iMicknl iMicknl merged commit a639cc2 into main Jan 7, 2024
1 check passed
@iMicknl iMicknl deleted the fix/code_quality_2024 branch January 7, 2024 16:21
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
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant