Merge ~jugmac00/lazr.sshserver:introduce-pre-commit into lazr.sshserver:master

Proposed by Jürgen Gmach
Status: Merged
Merge reported by: Jürgen Gmach
Merged at revision: 665262ded51d9d1bda00af3f4f67933d3452ea0f
Proposed branch: ~jugmac00/lazr.sshserver:introduce-pre-commit
Merge into: lazr.sshserver:master
Diff against target: 76 lines (+31/-3)
3 files modified
.pre-commit-config.yaml (+15/-0)
setup.py (+8/-3)
tox.ini (+8/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+410997@code.launchpad.net

Commit message

Add basic pre-commit configuration

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
2new file mode 100644
3index 0000000..d62393a
4--- /dev/null
5+++ b/.pre-commit-config.yaml
6@@ -0,0 +1,15 @@
7+# See https://pre-commit.com for more information
8+# See https://pre-commit.com/hooks.html for more hooks
9+repos:
10+- repo: https://github.com/pre-commit/pre-commit-hooks
11+ rev: v3.2.0
12+ hooks:
13+ - id: check-added-large-files
14+ - id: check-merge-conflict
15+ - id: check-xml
16+ - id: check-yaml
17+ - id: debug-statements
18+- repo: https://github.com/PyCQA/flake8
19+ rev: 3.9.2
20+ hooks:
21+ - id: flake8
22diff --git a/setup.py b/setup.py
23index 34fbea2..3ec9c9a 100755
24--- a/setup.py
25+++ b/setup.py
26@@ -18,6 +18,7 @@
27
28 from setuptools import setup, find_packages
29
30+
31 # generic helpers primarily for the long_description
32 def generate(*docname_or_string):
33 res = []
34@@ -38,7 +39,7 @@ setup(
35 version='0.1.12',
36 namespace_packages=['lazr'],
37 packages=find_packages('src'),
38- package_dir={'':'src'},
39+ package_dir={'': 'src'},
40 include_package_data=True,
41 zip_safe=False,
42 maintainer='LAZR Developers',
43@@ -56,11 +57,15 @@ setup(
44 'zope.interface',
45 ],
46 url='https://launchpad.net/lazr.sshserver',
47- download_url= 'https://launchpad.net/lazr.sshserver/+download',
48+ project_urls={
49+ "Source": "https://code.launchpad.net/lazr.sshserver",
50+ "Issue Tracker": "https://bugs.launchpad.net/lazr.sshserver",
51+ },
52+ download_url='https://launchpad.net/lazr.sshserver/+download',
53 classifiers=[
54 "Development Status :: 5 - Production/Stable",
55 "Intended Audience :: Developers",
56- "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
57+ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", # noqa: E501
58 "Operating System :: OS Independent",
59 "Programming Language :: Python",
60 "Programming Language :: Python :: 2",
61diff --git a/tox.ini b/tox.ini
62index 74e99fe..42cddc8 100644
63--- a/tox.ini
64+++ b/tox.ini
65@@ -8,3 +8,11 @@ commands =
66 deps =
67 .[test]
68 py34: Twisted[conch]<19.7.0
69+
70+[testenv:lint]
71+basepython =
72+ python3.8
73+deps =
74+ pre-commit
75+commands =
76+ pre-commit run --all-files

Subscribers

People subscribed via source and target branches