badges, lint

pull/14/head
sezanzeb 4 years ago
parent 77ab8ba47b
commit 5b562f472b

@ -347,7 +347,7 @@ def _parse_recurse(macro, macro_instance=None, depth=0):
# maybe this just applies a modifier for a certain amout of time.
# and maybe it's a wait in repeat or something. Don't make it
# fail here.
logger.warn(f'"{macro}" doesn\'t write any keys (using k)')
logger.warn('"%s" doesn\'t write any keys (using k)', macro)
# available functions in the macro and the number of their
# parameters

@ -132,7 +132,7 @@ def update_verbosity(debug):
except Exception as error:
# since this is optional, just skip all exceptions
if not isinstance(error, ImportError):
logger.debug(f'Cannot use rich.traceback: {error}')
logger.debug('Cannot use rich.traceback: %s', error)
else:
logger.setLevel(logging.INFO)

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="20">
<svg xmlns="http://www.w3.org/2000/svg" width="73" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="anybadge_1">
<rect width="80" height="20" rx="3" fill="#fff"/>
<rect width="73" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#4c1" d="M44 0h36v20H44z"/>
<path fill="url(#b)" d="M0 0h80v20H0z"/>
<path fill="#4c1" d="M44 0h29v20H44z"/>
<path fill="url(#b)" d="M0 0h73v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="23.0" y="15" fill="#010101" fill-opacity=".3">pylint</text>
<text x="22.0" y="14">pylint</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="63.0" y="15" fill="#010101" fill-opacity=".3">9.76</text>
<text x="62.0" y="14">9.76</text>
<text x="59.5" y="15" fill="#010101" fill-opacity=".3">9.7</text>
<text x="58.5" y="14">9.7</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -1,7 +1,9 @@
#!/usr/bin/env bash
# sudo pip install git+https://github.com/jongracecox/anybadge
# sudo pip install git+https://github.com/dbrgn/coverage-badge
coverage_badge() {
# https://github.com/dbrgn/coverage-badge
coverage run tests/test.py
coverage combine
python3 -m coverage_badge > readme/coverage.svg
@ -10,7 +12,6 @@ coverage_badge() {
}
pylint_badge() {
# https://github.com/jongracecox/anybadge
pylint_output=$(pylint keymapper --extension-pkg-whitelist=evdev)
rating=$(echo $pylint_output | grep -Po "rated at .+?/" | grep -Po "\d+.\d+")
rm readme/pylint.svg

Loading…
Cancel
Save