Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Dec 28, 2020
1 parent bef6097 commit 37dcc81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
8 changes: 4 additions & 4 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions yabs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ tasks:
[Commit details](https://github.com/{repo}/compare/{org_tag_name}...{tag_name}).
# draft: true
prerelease: null # null: guess from version number format
# upload:
# - sdist
# - bdist_wheel

- task: bump
inc: postrelease
Expand Down
21 changes: 1 addition & 20 deletions yabs/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
import logging
import os
import re
import sys
import time
import types
Expand Down Expand Up @@ -110,24 +109,6 @@ def check_cli_verbose(default=3):
return verbose


# TODO: Can be removed with latest version of Snazzy:
ANSI_ESCAPE_8BIT_STR = re.compile(
r"(?:\x1B[@-Z\\-_]|[\x80-\x9A\x9C-\x9F]|(?:\x1B\[|\x9B)[0-?]*[ -/]*[@-~])"
)
ANSI_ESCAPE_8BIT_BYTES = re.compile(
br"(?:\x1B[@-Z\\-_]|[\x80-\x9A\x9C-\x9F]|(?:\x1B\[|\x9B)[0-?]*[ -/]*[@-~])"
)


def cleanup_ansi_codes(s):
# 7-bit and 8-bit C1 ANSI sequences
if isinstance(s, str):
res = ANSI_ESCAPE_8BIT_STR.sub("", s)
else:
res = ANSI_ESCAPE_8BIT_BYTES.sub(b"", s)
return res


_prefix_map = None
_prefix_map_valid = False

Expand Down Expand Up @@ -169,7 +150,7 @@ def write(msg, level="info", prefix=False, output=None, output_level=None):
logger.log(level, prefix + msg)

if output:
prefix_len = len(cleanup_ansi_codes(prefix))
prefix_len = len(Snazzy.cleanup(prefix))
prefix = (" " * prefix_len) + " > "
lines = output.split("\n")
# strip trailing empty lines
Expand Down

0 comments on commit 37dcc81

Please sign in to comment.