Add typing for the functions in TestCase.
Review Request #14035 — Created July 13, 2024 and submitted
This updates
TestCase
to add type hints all throughout. This helps
ensure we pass in the right typse to functions, and that we get the
right transport and client types when setting up state for API tests.
Unit tests pass.
Summary | ID |
---|---|
98ad375cdd0626813277d9f77586bde3b28e185a |
Description | From | Last Updated |
---|---|---|
'typing.Any' imported but unused Column: 1 Error code: F401 |
reviewbot | |
redefinition of unused 'RBClient' from line 17 Column: 5 Error code: F811 |
reviewbot | |
While you're here, mind adding docstrings and changing to super()? |
david | |
Here too. |
david | |
Now that we're properly using __future__.annotations, we should change from Dict to dict and List to list. |
david | |
Blank line between these two. |
david | |
Can we add a doc comment for this? |
david | |
maxDiff doesn't appear to be used anywhere within the rbtools codebase. Can we just get rid of this? |
david | |
Should probably be Any instead of object. |
david |
- Change Summary:
-
Removed an unused import and a duplicate import.
- Commits:
-
Summary ID 6006d70d24e42d186300de3f86073b6b931b2b3b 9c81b7bfff3bec145667b91c415b0f60a6734587 - Diff:
-
Revision 2 (+126 -46)
Checks run (2 succeeded)
- Change Summary:
-
- Added some docstrings to the setup/teardown methods.
- Added additional type hints for class/instance variables.
- Simplified
super()
calls.
- Commits:
-
Summary ID 9c81b7bfff3bec145667b91c415b0f60a6734587 9ae2883847e5d422970e673033ec2840462c31be - Diff:
-
Revision 3 (+216 -62)
Checks run (2 succeeded)
- Change Summary:
-
- Switched from
Dict
andList
todict
andlist
, respectively. - Added a blank line between typing imports.
- Added a comment for
ws_re
.
- Switched from
- Commits:
-
Summary ID 9ae2883847e5d422970e673033ec2840462c31be 98ad375cdd0626813277d9f77586bde3b28e185a - Diff:
-
Revision 4 (+226 -70)