Skip to content

Commit b0af386

Browse files
committed
Adding pre-commit config
1 parent 94480e0 commit b0af386

File tree

63 files changed

+989
-790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+989
-790
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ nosetests.xml
3737
.idea
3838
env.txt
3939
.venv
40-

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://pre-commit.com/
2+
repos:
3+
- repo: git://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.1.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: end-of-file-fixer
8+
- id: mixed-line-ending
9+
args: [--fix=lf]
10+
- id: debug-statements
11+
# code formatting
12+
- repo: https://gitlab.com/pycqa/flake8
13+
rev: 4.0.1
14+
hooks:
15+
- id: flake8
16+
args: [ --max-line-length=120 ]
17+
- repo: https://github.com/python/black
18+
rev: 21.9b0
19+
hooks:
20+
- id: black
21+
args: [--safe, --line-length=120]
22+
- repo: https://github.com/PyCQA/isort
23+
rev: 5.10.1
24+
hooks:
25+
- id: isort
26+
args: ['--profile', 'black']

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
291291
the "copyright" line and a pointer to where the full notice is found.
292292

293293
Pylint plugin for improving code analysis for when using Django
294-
Copyright (C) 2013
294+
Copyright (C) 2013
295295

296296
This program is free software; you can redistribute it and/or modify
297297
it under the terms of the GNU General Public License as published by

pylint_django/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
from pylint_django import plugin
77

8-
if sys.version_info < (3, ):
9-
raise DeprecationWarning("Version 0.11.1 was the last to support Python 2. "
10-
"Please migrate to Python 3!")
8+
if sys.version_info < (3,):
9+
raise DeprecationWarning("Version 0.11.1 was the last to support Python 2. " "Please migrate to Python 3!")
1110

1211
register = plugin.register # pylint: disable=invalid-name
1312
load_configuration = plugin.load_configuration # pylint: disable=invalid-name

0 commit comments

Comments
 (0)