Skip to content

Commit 9b520e9

Browse files
committed
List Django as a dependency. Fix #96
also add a big warning statement about possible side effects and to deter people from reporting issues about Django version mismatches. Updates README formatting a bit as well.
1 parent b46e2cf commit 9b520e9

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,33 @@ pylint-django
1010

1111
`pylint-django` is a [Pylint](http://pylint.org) plugin for improving code analysis for when analysing code using Django. It is also used by the [Prospector](https://github.com/landscapeio/prospector) tool.
1212

13-
## Usage
13+
# Installation
1414

15-
#### Pylint
15+
```
16+
pip install pylint-django
17+
```
18+
19+
**WARNING:** `pylint-django` requires `Django` to be installed. Our `setup.py` file doesn't
20+
specify which particular version of Django is going to be installed because we have no idea
21+
what version is used inside your project. The latest version of Django will be installed if
22+
it has not been installed beforehand! DO NOT report issues about mismatching Django versions
23+
if that happens. Instead get your testing environment sorted out and make sure that you have
24+
the appropriate version of Django installed!
25+
26+
# Usage
27+
28+
## Pylint
1629

17-
Ensure `pylint-django` is installed and on your path (`pip install pylint-django`), and then run pylint:
30+
Ensure `pylint-django` is installed and on your path and then execute:
1831

1932
```
2033
pylint --load-plugins pylint_django [..other options..]
2134
```
2235

23-
#### Prospector
36+
## Prospector
2437

25-
If you have `prospector` installed, then `pylint-django` will already be installed as a dependency, and will be activated automatically if Django is detected.
38+
If you have `prospector` installed, then `pylint-django` will already be installed as a dependency,
39+
and will be activated automatically if Django is detected.
2640

2741
```
2842
prospector [..other options..]
@@ -42,14 +56,14 @@ Please feel free to add your name to the `CONTRIBUTORS.md` file if you want to b
4256
credited when pull requests get merged. You can also add to the `CHANGELOG.md` file
4357
if you wish, although I'll also do that when merging if not.
4458

45-
## Tests
59+
# Tests
4660

4761
The structure of the test package follows that from pylint itself.
4862

4963
It is fairly simple: create a module starting with `func_` followed by
5064
a test name, and insert into it some code. The tests will run pylint
51-
against these modules. If the idea is that no messages now occur, then
52-
that is fine, just check to see if it works by running `scripts/test.sh`.
65+
against these modules. If the idea is that no messages now occur, then
66+
that is fine, just check to see if it works by running `scripts/test.sh`.
5367

5468
Ideally, add some pylint error suppression messages to the file to prevent
5569
spurious warnings, since these are all tiny little modules not designed to
@@ -64,4 +78,4 @@ These are useful to quickly add "expected messages".
6478

6579
# License
6680

67-
`pylint-django` is available under the GPLv2 license.
81+
`pylint-django` is available under the GPLv2 license.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
install_requires=[
1818
'pylint-plugin-utils>=0.2.1',
1919
'pylint>=1.8.2',
20+
'Django',
2021
],
2122
license='GPLv2',
2223
classifiers=[

0 commit comments

Comments
 (0)