-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor(update-server): Type update-server more strictly #10458
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #10458 +/- ##
==========================================
- Coverage 73.64% 73.64% -0.01%
==========================================
Files 2134 2135 +1
Lines 57366 57376 +10
Branches 5754 5754
==========================================
+ Hits 42249 42253 +4
- Misses 13913 13919 +6
Partials 1204 1204
Flags with carried forward coverage won't be shown. Click here to find out more.
|
hostname = loop.run_until_complete(name_management.setup_hostname()) | ||
hostname = loop.run_until_complete(name_management.set_up_static_hostname()) |
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.
This change is intentional. setup_hostname()
got renamed to set_up_static_hostname()
in #10219.
@@ -53,9 +53,9 @@ test: | |||
|
|||
.PHONY: lint | |||
lint: | |||
$(python) -m mypy otupdate |
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.
In my experience, running mypy
first makes for the nicest dev experience because its errors tend to be the ones that matter most.
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.
Changes look great to me! We should get embedded signoff before moving forward. I won't officially approve until I've actually tested this on hardware, to be safe
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.
Looks good, thanks for the changes on the openembedded side!
Tested again after that last commit that |
Overview
This PR enhances static type-checking in
update-server
.Changelog
aiohttp.web.Request
class existed.api
androbot-server
packages.mypy.ini
and leave a# TODO
comment for them. This follows the pattern set byapi
androbot-server
.Review requests
Go over the code and make sure that the changes are only to type annotations, unless I've noted otherwise.
I've tested this on a real OT-2 by making sure that it can still apply an update file and that it can still accept robot renames. I don't have an OT-3 environment to test on.
Risk assessment
Low as long as I haven't accidentally affected the runtime behavior of anything.