-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Improve type hints in trace #78366
Improve type hints in trace #78366
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( |
config: dict[str, Any] | None, | ||
blueprint_inputs: dict[str, Any] | None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've enabled None
here for config
and blueprint_inputs
I couldn't find a reason for them to be compulsory, and it helps with #78368
@@ -239,7 +241,7 @@ def __init__( | |||
trace_set_child_id(self.key, self.run_id) | |||
trace_id_set((self.key, self.run_id)) | |||
|
|||
def set_trace(self, trace: dict[str, deque[TraceElement]]) -> None: | |||
def set_trace(self, trace: dict[str, deque[TraceElement]] | None) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've enabled None
here for trace
Since self._trace
is already set to be optional, I think this should be OK and it helps with #78368
Proposed change
Improve type hints in trace
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: