Skip to content

Commit

Permalink
bandit !minor
Browse files Browse the repository at this point in the history
  • Loading branch information
artem.vasin committed Nov 21, 2019
1 parent 46578e1 commit 0eacc40
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bandit]
exclude: /tests
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ script:

jobs:
include:
- stage: flake8
- stage: Linters
python: 3.7
env:
- DJANGO=Django==2.2
- ALLOW_FAILURE=True
name: Flake8
script: flake8
- script: bandit -r .
name: Bandit
- stage: "Code Climate"
python: 3.7
env: DJANGO=Django==2.2
Expand Down Expand Up @@ -96,7 +98,6 @@ jobs:
env: DJANGO="--pre Django""
- python: "3.8"
env: DJANGO="--pre Django""
- env: ALLOW_FAILURE=True

notifications:
email:
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ Ready to contribute? Here's how to set up `cool-django-auth-ldap` for local deve

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
5. When you're done making changes, check that your changes pass flake8, bandit and the
tests, including testing other Python versions with tox::

$ flake8 cool_django_auth_ldap tests
$ bandit -r .
$ python manage.py test --settings tests.settings

To get flake8, just pip install it into your virtualenv.
To get flake8 and bandit, just pip install it into your virtualenv (Should be installed uf you use requirements_dev.txt).

6. Commit your changes and push your branch to GitHub::

Expand Down
4 changes: 0 additions & 4 deletions cool_django_auth_ldap/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@
ldap_error = django.dispatch.Signal(providing_args=["context", "user", "exception"]) # pylint: disable=invalid-name






class LDAPBackend:
"""
The main backend class. This implements the auth backend API, although it
Expand Down
1 change: 1 addition & 0 deletions requirements_ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ wheel
twine
pbr
gitchangelog
bandit
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ wheel==0.30.0
gitchangelog
pylint
flake8>=2.1.0
bandit

0 comments on commit 0eacc40

Please sign in to comment.