Skip to content

Commit 6d3eb44

Browse files
Utilize pre-commit to help devs follow style guidelines (#1495)
* Utilize pre-commit to enforce style guidelines. * Fix blanket noqa statements. * Fix doc8 linting issues. * Fix prettier types. * Removing F401 violations.
1 parent 3ed59cb commit 6d3eb44

File tree

31 files changed

+132
-59
lines changed

31 files changed

+132
-59
lines changed

.pre-commit-config.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: mixed-line-ending
9+
- repo: https://github.com/pycqa/flake8
10+
rev: 3.9.2
11+
hooks:
12+
- id: flake8
13+
- repo: https://github.com/pycqa/doc8
14+
rev: 0.9.0
15+
hooks:
16+
- id: doc8
17+
- repo: https://github.com/pycqa/isort
18+
rev: 5.9.3
19+
hooks:
20+
- id: isort
21+
- repo: https://github.com/pre-commit/pygrep-hooks
22+
rev: v1.9.0
23+
hooks:
24+
- id: python-check-blanket-noqa
25+
- id: python-check-mock-methods
26+
- id: python-no-eval
27+
- id: python-no-log-warn
28+
- id: rst-backticks
29+
- id: rst-directive-colons
30+
- repo: https://github.com/pre-commit/mirrors-prettier
31+
rev: v2.3.2
32+
hooks:
33+
- id: prettier
34+
types_or: [javascript, css]
35+
- repo: https://github.com/pre-commit/mirrors-eslint
36+
rev: v8.0.0-beta.0
37+
hooks:
38+
- id: eslint
39+
files: \.js?$
40+
types: [file]
41+
- repo: https://github.com/psf/black
42+
rev: 21.7b0
43+
hooks:
44+
- id: black
45+
language_version: python3
46+
entry: black --target-version=py36

.tx/config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ lang_map = sr@latin:sr_Latn
66
file_filter = debug_toolbar/locale/<lang>/LC_MESSAGES/django.po
77
source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po
88
source_lang = en
9-

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ All rights reserved.
44
Redistribution and use in source and binary forms, with or without modification,
55
are permitted provided that the following conditions are met:
66

7-
1. Redistributions of source code must retain the above copyright notice,
7+
1. Redistributions of source code must retain the above copyright notice,
88
this list of conditions and the following disclaimer.
9-
10-
2. Redistributions in binary form must reproduce the above copyright
9+
10+
2. Redistributions in binary form must reproduce the above copyright
1111
notice, this list of conditions and the following disclaimer in the
1212
documentation and/or other materials provided with the distribution.
1313

debug_toolbar/locale/ca/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22
# This file is distributed under the same license as the PACKAGE package.
3-
#
4-
#
3+
#
4+
#
55
# Translators:
66
# Libre El Chaval <[email protected]>, 2013
77
msgid ""

debug_toolbar/locale/cs/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22
# This file is distributed under the same license as the PACKAGE package.
3-
#
4-
#
3+
#
4+
#
55
# Translators:
66
# Vlada Macek <[email protected]>, 2013
77
msgid ""

debug_toolbar/locale/de/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22
# This file is distributed under the same license as the PACKAGE package.
3-
#
4-
#
3+
#
4+
#
55
# Translators:
66
# Jannis Leidel <[email protected]>, 2012-2013
77
msgid ""

debug_toolbar/locale/en/LC_MESSAGES/django.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Django Debug Toolbar\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2021-08-14 10:25-0500\n"
9+
"POT-Creation-Date: 2021-08-23 19:54-0500\n"
1010
"PO-Revision-Date: 2012-03-31 20:10+0000\n"
1111
"Last-Translator: \n"
1212
"Language-Team: \n"

debug_toolbar/locale/es/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22
# This file is distributed under the same license as the PACKAGE package.
3-
#
4-
#
3+
#
4+
#
55
# Translators:
66
# jcatalan <[email protected]>, 2014
77
# Leonardo J. Caballero G. <[email protected]>, 2013-2014

debug_toolbar/locale/fi/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22
# This file is distributed under the same license as the PACKAGE package.
3-
#
4-
#
3+
#
4+
#
55
# Translators:
66
# nanook <[email protected]>, 2012
77
msgid ""

debug_toolbar/locale/fr/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22
# This file is distributed under the same license as the PACKAGE package.
3-
#
4-
#
3+
#
4+
#
55
# Translators:
66
# Pingax <[email protected]>, 2013
77
# claudep <[email protected]>, 2013

0 commit comments

Comments
 (0)