<commit_before>#!/bin/bash

# Enable **/* expansions
shopt -s globstar

# This script will only do removal of whitespace
# It relies on the autopep8 tool and the
# specifics of whitespace error/warnings

# List of errors of whitespace stuff
select="E101,E20,E211,E231,E301,E302,E303,E304,E309,W291,W293,W391"
# Errors of comparison with None and bool
select="$select,E711,E712"
# Imports on single lines
select="$select,E401"

# pretty print command select running
echo "autopep8 --select \"$select\""
autopep8 -j -1 --select "$select" --in-place -r --exclude build,dist . **/*.pyx **/*.pxd

# Non-Python files
autopep8 --select "W291,W293" --in-place CHANGELOG

# Remove white-space on empty lines
sed -i -s -e 's/^[[:space:]]*$//g' **/*.f90
# Remove trailing white-space
sed -i -s -e 's/\([^[:space:]]\)[[:space:]]?$/\1/g' **/*.f90
# Delete all comments in Cythonized sources
sed -i -s -e '/^# [0-9].*\.c\"/d' sisl/**/*.c<commit_msg>maint: removed pep8 corrections for *.c files<commit_after>#!/bin/bash

# Enable **/* expansions
shopt -s globstar

# This script will only do removal of whitespace
# It relies on the autopep8 tool and the
# specifics of whitespace error/warnings

# List of errors of whitespace stuff
select="E101,E20,E211,E231,E301,E302,E303,E304,E309,W291,W293,W391"
# Errors of comparison with None and bool
select="$select,E711,E712"
# Imports on single lines
select="$select,E401"

# pretty print command select running
echo "autopep8 --select \"$select\""
autopep8 -j -1 --select "$select" --in-place -r --exclude build,dist . **/*.pyx **/*.pxd

# Non-Python files
autopep8 --select "W291,W293" --in-place CHANGELOG

# Remove white-space on empty lines
sed -i -s -e 's/^[[:space:]]*$//g' **/*.f90
# Remove trailing white-space
sed -i -s -e 's/\([^[:space:]]\)[[:space:]]?$/\1/g' **/*.f90
{'fraction_non_alphanumeric': 0.17991169977924945, 'fraction_numerical': 0.06788079470198675, 'mean_word_length': 4.050139275766017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3148341', 'n_tokens_mistral': 760, 'n_tokens_neox': 675, 'n_words': 203}