-
Notifications
You must be signed in to change notification settings - Fork 5
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
Clean up the code #11
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
This abstraction was never needed or used, and just adds noise. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Now we already have the `microgrid` namespace, so the prefix is redundant. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
We group all the necessary disabling of `pylint` checks and make the names more clear regarding if they are from the generated protobuf files or not. This also reenable the checks after they are not needed anymore, so the linter can still check the rest of the file for other (valid) errors. We also need to use `.ValueType` instead of `.V` because `pylint` also think that `V` doesn't exist. It seems more clear to use `.ValueType` anyway. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
There is really no reason to make an exception here. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
We need to make sure to use the `disable` rules inline instead of its own line to make sure they are not kept for the rest of the file. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Importing `grpc` doesn't always work, or confuses some linters, because `aio` is not publicly exposed in the `grpc` package in all `grpcio` versions. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
It is simpler and more future proof to use a *bound* `TypeVar` instead of specifying the `ComponentData` subclasses one by one as a *constraint*. With this we also make sure that the resolved type is the actual subclass of `ComponentData`. The comment is also removed as it doesn't really provide much useful information, all the information is either present in the `TypeVar` declaration and documentation or is repeating the documentation for `_component_data_task` and it is outdated because it is used in other methods too. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
github-actions
bot
added
part:tests
Affects the unit, integration and performance (benchmarks) tests
part:client
Affects the client code
part:docs
Affects the documentation
labels
Feb 28, 2024
llucax
added
scope:breaking-change
Breaking change, users will need to update their code
type:enhancement
New feature or enhancement visitble to users
type:tech-debt
Improves the project without visible changes for users
and removed
part:docs
Affects the documentation
labels
Feb 28, 2024
All the other modules are private, so there is no reason why this shouldn't be either. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
All other classes are dataclasses, so it is better for consistency. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
The module itself is private, but the functions are used outside the module, so they should be public. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Marenz
approved these changes
Feb 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
part:client
Affects the client code
part:docs
Affects the documentation
part:tests
Affects the unit, integration and performance (benchmarks) tests
scope:breaking-change
Breaking change, users will need to update their code
type:enhancement
New feature or enhancement visitble to users
type:tech-debt
Improves the project without visible changes for users
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.
ApiClient
use-implicit-booleaness-not-comparison
unused-argument
check for the whole filegrpc.aio
instead ofgrpc
TypeVar
forComponentData
Self
infrom_proto()
constructors