Skip to content

Commit

Permalink
remove unnecessary system check for Unicode output
Browse files Browse the repository at this point in the history
  • Loading branch information
Brennen Raimer authored and norweeg committed Nov 24, 2020
1 parent 89c7934 commit ae8b95a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
16 changes: 0 additions & 16 deletions halo/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@
init(autoreset=True)


def is_supported():
"""Check whether operating system supports main symbols or not.
Returns
-------
boolean
Whether operating system supports main symbols or not
"""

os_arch = platform.system()

if os_arch != 'Windows':
return True

return False


def get_environment():
"""Get the environment in which halo is running
Expand Down
9 changes: 3 additions & 6 deletions halo/halo.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,10 @@ def _get_spinner(self, spinner):
if spinner and type(spinner) == dict:
return spinner

if is_supported():
if all([is_text_type(spinner), spinner in Spinners.__members__]):
return Spinners[spinner].value
else:
return default_spinner
if all([is_text_type(spinner), spinner in Spinners.__members__]):
return Spinners[spinner].value
else:
return Spinners["line"].value
return default_spinner

def _get_text(self, text):
"""Creates frames based on the selected animation
Expand Down

0 comments on commit ae8b95a

Please sign in to comment.