-
-
Notifications
You must be signed in to change notification settings - Fork 69
/
Makefile
25 lines (23 loc) · 796 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# thanks zeph
PYTHON ?= python3.8
DIFF := $(shell git diff --name-only --staged "*.py" "*.pyi")
ifeq ($(DIFF),)
DIFF := $(shell git ls-files "*.py" "*.pyi")
endif
installreqs:
$(PYTHON) -m pip install --upgrade autoflake isort black
lint:
$(PYTHON) -m flake8 --count --select=E9,F7,F82 --show-source $(DIFF)
stylecheck:
$(PYTHON) -m autoflake --check --imports aiohttp,discord,redbot $(DIFF)
$(PYTHON) -m isort --check-only $(DIFF)
$(PYTHON) -m black --check $(DIFF)
reformat:
$(PYTHON) -m autoflake --in-place --imports=aiohttp,discord,redbot $(DIFF)
$(PYTHON) -m isort $(DIFF)
$(PYTHON) -m black $(DIFF)
reformatblack:
$(PYTHON) -m black $(DIFF)
# Translations
gettext:
$(PYTHON) -m redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"