Page MenuHomekolab.org

[Python 3] def ensure_binary / some ___prepare binary return fix
Needs ReviewPublic

Authored by ghane on Sep 30 2022, 1:38 PM.

Details

Reviewers
None
Group Reviewers
PyKolab Developers
Summary

def ensure_binary added

"== None" -> new PEP8 style "is None"

def lsub ensure ml is str for variable manipulation
def lm prepare return bytes
manipulations and clauses between
prepare and docommand ensure to be bytes
as well, as var1, var2 =
docommand(), var2 ensure_str

Diff Detail

Repository
rP pykolab
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ghane requested review of this revision.Sep 30 2022, 1:38 PM
ghane created this revision.
sicherha added inline comments.
cyruslib.py
564

In D3884 you try to ensure that lm() always receives a str. Here, by contrast, you change the parameter's default value to the type bytes. That looks inconsistent to me.