Open andylizf opened 2 weeks ago
@cblmemo PTAL, thanks!
Please refer to the style guide: https://google.github.io/styleguide/pyguide.html#214-truefalse-evaluations
@Michaelvll Precisely. As mentioned, this modification was just made based on the Google Python Style Guide. Please refer to: https://google.github.io/styleguide/pyguide.html#2144-decision.
@Michaelvll By the way, when you have a moment, could you take a look at #4250 ? Thanks a lot!
Ahh, thanks for fixing these! I misread the message. Looks pretty good at the first glance. cc'ing @cblmemo to take a closer look. : )
Replace len() comparisons with 0/1 with pythonic empty sequence checks, following Google Python Style Guide's recommendation:
Also fixed some typing annotations along the way.
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh