Skip to content
Snippets Groups Projects
Commit 72e81d7d authored by Jiri Podivin's avatar Jiri Podivin
Browse files

Removing helper functions providing Python < 3.3 compatibility

Functions used for deriving terminal width are no longer
necessary, as Python 3.3 introduced[0] built in solution.

Remaining helper function `utils.terminal_width` received docstring
explaining return parameters.

Method `_assign_max_widths` of the `TableFormatter` class was refactored
to no longer use the `stdout` argument. Uses of the method were adjusted accordingly.
Method now also has minimal docstring. Minor adjustment was made to inline comments
to more closely reflect functionality of the code.

[0]https://docs.python.org/3.8/library/os.html?highlight=get_terminal_size#os.get_terminal_size



Signed-off-by: default avatarJiri Podivin <jpodivin@redhat.com>
Change-Id: I2898f099227e8c97aef6492c60f2f99038aa1357
parent fb9a3a9b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment