This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, master has been updated
via 747da169fd122facf9b1b46af5f420867bd4e8d7 (commit)
via 98a255b89bdbb051260c7eb8e3c21fe65aa177df (commit)
from 80b163b8db1c629ea0b7323dd50b95dbc9e0f204 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceforge.net/p/sqlobject/sqlobject/ci/747da169fd122facf9b1b46af5f420867bd4e8d7
commit 747da169fd122facf9b1b46af5f420867bd4e8d7
Author: Oleg Broytman <ph...@ph...>
Date: Fri Feb 13 22:01:40 2015 +0300
Fix #36 flake8 W391 blank line at end of file
diff --git a/setup.cfg b/setup.cfg
index baeb80b..dc56a50 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,9 +16,8 @@ exclude = .git,docs/europython/*.py,ez_setup.py
; E401 multiple imports on one line
; F403 'from module import *' used; unable to detect undefined names
; F822 undefined name in __all__
-; W391 blank line at end of file
; W603 '<>' is deprecated, use '!='
-ignore = E123,E226,E401,F403,F822,W391,W603
+ignore = E123,E226,E401,F403,F822,W603
[pudge]
theme = pythonpaste.org
diff --git a/sqlobject/declarative.py b/sqlobject/declarative.py
index 33d2db5..bc3485a 100644
--- a/sqlobject/declarative.py
+++ b/sqlobject/declarative.py
@@ -207,4 +207,3 @@ def setup_attributes(cls, new_attrs):
for name, value in new_attrs.items():
if hasattr(value, '__addtoclass__'):
value.__addtoclass__(cls, name)
-
diff --git a/sqlobject/tests/test_csvexport.py b/sqlobject/tests/test_csvexport.py
index bd56a14..7f97f2d 100644
--- a/sqlobject/tests/test_csvexport.py
+++ b/sqlobject/tests/test_csvexport.py
@@ -99,4 +99,3 @@ def test_zip():
assert isinstance(s, str) and s
s = export_csv_zip([SimpleCSV.selectBy(name='Bob'),
(ComplexCSV, list(ComplexCSV.selectBy(fname='John')))])
-
diff --git a/sqlobject/tests/test_inheritance.py b/sqlobject/tests/test_inheritance.py
index 62a0f63..becdfce 100644
--- a/sqlobject/tests/test_inheritance.py
+++ b/sqlobject/tests/test_inheritance.py
@@ -33,4 +33,3 @@ def test_sub():
Sub(name='two', name2='2') # s2
s3 = Sub.get(s1.id)
assert s1 == s3
-
diff --git a/sqlobject/tests/test_sqlobject_admin.py b/sqlobject/tests/test_sqlobject_admin.py
index 7debce3..d16b44d 100644
--- a/sqlobject/tests/test_sqlobject_admin.py
+++ b/sqlobject/tests/test_sqlobject_admin.py
@@ -36,4 +36,3 @@ class Test5(SQLObject):
class sqlmeta:
createSQL = {'mysql': 'CREATE SEQUENCE db_test5_seq;'}
test5 = StringCol()
-
diff --git a/sqlobject/versioning/__init__.py b/sqlobject/versioning/__init__.py
index 512aa8c..956c5d6 100644
--- a/sqlobject/versioning/__init__.py
+++ b/sqlobject/versioning/__init__.py
@@ -118,4 +118,3 @@ class Versioning(object):
return self
return self.versionClass.select(
self.versionClass.q.masterID == obj.id, connection=obj._connection)
-
http://sourceforge.net/p/sqlobject/sqlobject/ci/98a255b89bdbb051260c7eb8e3c21fe65aa177df
commit 98a255b89bdbb051260c7eb8e3c21fe65aa177df
Author: Oleg Broytman <ph...@ph...>
Date: Fri Feb 13 21:56:34 2015 +0300
Fix #43 flake8 E712 comparison to bool should be 'if cond is' or 'if cond'
diff --git a/sqlobject/main.py b/sqlobject/main.py
index 1ed8bf8..5812b29 100644
--- a/sqlobject/main.py
+++ b/sqlobject/main.py
@@ -1640,7 +1640,7 @@ class SQLObject(object):
query = []
delete = setnull = restrict = False
for _col in cols:
- if _col.cascade == False:
+ if _col.cascade is False:
# Found a restriction
restrict = True
query.append(getattr(k.q, _col.name) == self.id)
diff --git a/sqlobject/tests/test_basic.py b/sqlobject/tests/test_basic.py
index ffa67d6..a481708 100644
--- a/sqlobject/tests/test_basic.py
+++ b/sqlobject/tests/test_basic.py
@@ -90,9 +90,9 @@ class Student(SQLObject):
def test_boolCol():
setupClass(Student)
student = Student(is_smart=False)
- assert student.is_smart == False
+ assert not student.is_smart
student2 = Student(is_smart=1)
- assert student2.is_smart == True
+ assert student2.is_smart
class TestSO3(SQLObject):
diff --git a/sqlobject/tests/test_sqlbuilder.py b/sqlobject/tests/test_sqlbuilder.py
index 7a3eec7..fea08ae 100644
--- a/sqlobject/tests/test_sqlbuilder.py
+++ b/sqlobject/tests/test_sqlbuilder.py
@@ -34,7 +34,7 @@ def test_Select():
def test_empty_AND():
assert AND() is None
- assert AND(True) == True
+ assert AND(True) is True
# sqlrepr() is needed because AND() returns an SQLExpression that overrides
# comparison. The following
diff --git a/sqlobject/tests/test_sqlbuilder_dbspecific.py b/sqlobject/tests/test_sqlbuilder_dbspecific.py
index 029b72b..7e423c0 100644
--- a/sqlobject/tests/test_sqlbuilder_dbspecific.py
+++ b/sqlobject/tests/test_sqlbuilder_dbspecific.py
@@ -17,7 +17,8 @@ class SBButton(SQLObject):
def makeClause():
- return SBButton.q.activated == True
+ # It's not a comparison, it's an SQLExpression
+ return SBButton.q.activated == True # noqa
def makeSelect():
-----------------------------------------------------------------------
Summary of changes:
setup.cfg | 3 +--
sqlobject/declarative.py | 1 -
sqlobject/main.py | 2 +-
sqlobject/tests/test_basic.py | 4 ++--
sqlobject/tests/test_csvexport.py | 1 -
sqlobject/tests/test_inheritance.py | 1 -
sqlobject/tests/test_sqlbuilder.py | 2 +-
sqlobject/tests/test_sqlbuilder_dbspecific.py | 3 ++-
sqlobject/tests/test_sqlobject_admin.py | 1 -
sqlobject/versioning/__init__.py | 1 -
10 files changed, 7 insertions(+), 12 deletions(-)
hooks/post-receive
--
SQLObject development repository
|