<commit_before>MAKEFLAGS := -j 1

# Colorable output
include mk/color.mk
# Snippets for debug and profiling
include mk/debug_code.mk

RPLUGIN_PATH := ./rplugin/python3/deoplete/sources/
MODULE_NAME := deoplete_jedi.py

DEOPLETE_JEDI := ${RPLUGIN_PATH}${MODULE_NAME}
HELPER := ${RPLUGIN_PATH}/deoplete_clang/helper.py
PROFILER := ${RPLUGIN_PATH}/deoplete_clang/profiler.py

all: autopep8

test: test_modules flake8

test_modules:
	pip3 install -U -r ./test/requirements.txt

flake8:
	flake8 -v --config=$(PWD)/.flake8 ${DEOPLETE_JEDI} ${HELPER} ${PROFILER} || true

autopep8: clean
	autopep8 -i ${DEOPLETE_JEDI}

clean:
	@echo "Cleanup debug code in ${CYELLOW}${DEOPLETE_JEDI}${CRESET}..."
	@sed -i ':a;N;$$!ba;s/\n        try:.*    def get_complete_position/\n    def get_complete_position/g' ${DEOPLETE_JEDI}
	@sed -i ':a;N;$$!ba;s/${IMPORT_LOGGER}\n\n//g' ${DEOPLETE_JEDI}
	@sed -i ':a;N;$$!ba;s/${IMPORT_TIMEIT}\n//g' ${DEOPLETE_JEDI}
	@sed -i ':a;N;$$!ba;s/${IMPORT_PYVMMONITOR}\n//g' ${DEOPLETE_JEDI}<commit_msg>Rename test job to lint<commit_after>MAKEFLAGS := -j 1

# Colorable output
include mk/color.mk
# Snippets for debug and profiling
include mk/debug_code.mk

RPLUGIN_PATH := ./rplugin/python3/deoplete/sources/
MODULE_NAME := deoplete_jedi.py

DEOPLETE_JEDI := ${RPLUGIN_PATH}${MODULE_NAME}
HELPER := ${RPLUGIN_PATH}/deoplete_clang/helper.py
PROFILER := ${RPLUGIN_PATH}/deoplete_clang/profiler.py

all: autopep8

lint: lint_modules flake8

lint_modules:
	pip3 install -U -r ./test/requirements.txt

flake8:
	flake8 -v --config=$(PWD)/.flake8 ${DEOPLETE_JEDI} ${HELPER} ${PROFILER} || true

autopep8: clean
	autopep8 -i ${DEOPLETE_JEDI}

clean:
	@echo "Cleanup debug code in ${CYELLOW}${DEOPLETE_JEDI}${CRESET}..."
	@sed -i ':a;N;$$!ba;s/\n        try:.*    def get_complete_position/\n    def get_complete_position/g' ${DEOPLETE_JEDI}
	@sed -i ':a;N;$$!ba;s/${IMPORT_LOGGER}\n\n//g' ${DEOPLETE_JEDI}
	@sed -i ':a;N;$$!ba;s/${IMPORT_TIMEIT}\n//g' ${DEOPLETE_JEDI}
	@sed -i ':a;N;$$!ba;s/${IMPORT_PYVMMONITOR}\n//g' ${DEOPLETE_JEDI}
{'fraction_non_alphanumeric': 0.18003913894324852, 'fraction_numerical': 0.009784735812133072, 'mean_word_length': 4.927536231884058, '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': '6728153', 'n_tokens_mistral': 930, 'n_tokens_neox': 928, 'n_words': 155}