Skip to content

Commit

Permalink
Fixed flake8 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Jan 12, 2014
1 parent 56ab5f5 commit c726598
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion django/dispatch/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from django.utils.six.moves import xrange

if sys.version_info < (3,4):
if sys.version_info < (3, 4):
from .weakref_backports import WeakMethod
else:
from weakref import WeakMethod
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ doc_files = docs extras AUTHORS INSTALL LICENSE README.rst
install-script = scripts/rpm-install.sh

[flake8]
exclude=build,.git,./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./django/utils/lru_cache.py,./tests/comment_tests/*,./django/test/_doctest.py,./django/utils/six.py,./django/conf/app_template/*
exclude=build,.git,./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./django/utils/lru_cache.py,./tests/comment_tests/*,./django/test/_doctest.py,./django/utils/six.py,./django/conf/app_template/*,./django/dispatch/weakref_backports.py
ignore=E128,E501,W601

[metadata]
Expand Down
1 change: 0 additions & 1 deletion tests/backends/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ def test_connect_non_autocommit(self):
new_connection = new_connections[DEFAULT_DB_ALIAS]
try:
new_connection.settings_dict['AUTOCOMMIT'] = False
cursor = new_connection.cursor()

This comment has been minimized.

Copy link
@aaugustin

aaugustin Jan 12, 2014

Member

After this change, the test passes but doesn't validate the correct behavior.

The call to new_connection.cursor() is required to open the database connection; assigning it to cursor was useless.

self.assertFalse(new_connection.get_autocommit())
finally:
new_connection.close()
Expand Down

0 comments on commit c726598

Please sign in to comment.