Skip to content

Commit 4047e0e

Browse files
committed
Prepare pre-commit and black tools
1 parent f62d345 commit 4047e0e

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
default_language_version:
2+
python: python3.7
3+
fail_fast: true
4+
repos:
5+
- hooks:
6+
- id: black
7+
repo: https://github.com/ambv/black
8+
rev: stable

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool.black]
2+
line-length = 79

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
VERSION = re.search("__version__ = '([^']+)'", fp.read()).group(1)
1515

1616

17+
extras_require = {
18+
"dev": ["pre-commit"],
19+
"lint": ["black", "flake8"],
20+
"test": ["pytest"],
21+
}
22+
extras_require["dev"] = sorted(set(sum(extras_require.values(), [])))
23+
24+
1725
setup(name=PACKAGE_NAME,
1826
author='Bryce Boe',
1927
author_email='[email protected]',
@@ -24,6 +32,7 @@
2432
'Programming Language :: Python :: 3'],
2533
description='A program to delete old slack messages.',
2634
entry_points={'console_scripts': ['deslackify = deslackify:main']},
35+
extras_require=extras_require,
2736
install_requires=['slacker >=0.12, <0.13'],
2837
keywords='slack',
2938
license='Simplified BSD License',

0 commit comments

Comments
 (0)