<commit_before>#!/bin/sh

#/ Usage: pylint.sh file.py [file.py...]
#/
#/ Runs pep8 and pylint checkers over the given python source files.

[ $# -gt 0 ] || { grep '^#/' "$0" | cut -c4- >&2; exit 1; }

pep8options() {
    # E501: line too long > 80 chars (because pylint does it)
    echo --ignore=E501
}

ret=0
for f in "$@"; do
    r=0
    pylint --rcfile="$(dirname "$0")/pylint.conf" $f || r=1 ret=1
    pep8 $(pep8options $f) $f || r=1 ret=1<commit_msg>make check-pylint: Hide pygobject deprecation messages<commit_after>#!/bin/sh

#/ Usage: pylint.sh file.py [file.py...]
#/
#/ Runs pep8 and pylint checkers over the given python source files.

[ $# -gt 0 ] || { grep '^#/' "$0" | cut -c4- >&2; exit 1; }

pep8options() {
    # E501: line too long > 80 chars (because pylint does it)
    echo --ignore=E501
}

ret=0
for f in "$@"; do
    r=0
    {
        pylint --rcfile="$(dirname "$0")/pylint.conf" $f || r=1 ret=1 
    } 2>&1 | grep -v 'pygobject_register_sinkfunc is deprecated'
    pep8 $(pep8options $f) $f || r=1 ret=1
{'fraction_non_alphanumeric': 0.1901066925315228, 'fraction_numerical': 0.04849660523763336, 'mean_word_length': 2.8507462686567164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5955025', 'n_tokens_mistral': 463, 'n_tokens_neox': 425, 'n_words': 122}