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 d4d62c29687742c98ea32116f28beb19bd485be6 (commit)
via 47ab39269bc982300f002d4edaa2395838125375 (commit)
via bdd9c455145c675517dfd1023766c57baf81248d (commit)
via 86bbf2cc2f501dddad230797f70e02e78fb3c193 (commit)
via 258f0fb3c9240247be9d73df1710441aca0fa05f (commit)
from 1711dd6a30542d836254f8045f2ffdff61b44947 (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/d4d62c29687742c98ea32116f28beb19bd485be6
commit d4d62c29687742c98ea32116f28beb19bd485be6
Merge: 1711dd6 47ab392
Author: Oleg Broytman <ph...@ph...>
Date: Mon Jan 26 21:41:00 2015 +0300
Merge branch 'flake8-fixes'
http://sourceforge.net/p/sqlobject/sqlobject/ci/47ab39269bc982300f002d4edaa2395838125375
commit 47ab39269bc982300f002d4edaa2395838125375
Author: Oleg Broytman <ph...@ph...>
Date: Mon Jan 26 21:39:48 2015 +0300
Explicitly list all F* and W* warnings to ignore
diff --git a/setup.cfg b/setup.cfg
index ef3f0d2..82f72a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -18,7 +18,16 @@ exclude = .git,docs/europython/*.py,ez_setup.py
; E226 missing whitespace around arithmetic operator
; E401 multiple imports on one line
; E502 the backslash is redundant between brackets
-ignore = E123,E124,E126,E221,E226,E401,E502,F
+; F402 import 'name' shadowed by loop variable
+; F403 'from module import *' used; unable to detect undefined names
+; F812 list comprehension redefines 'name' from line 1402
+; F821 undefined name
+; F822 undefined name in __all__
+; W291 trailing whitespace
+; W293 blank line contains whitespace
+; W391 blank line at end of file
+; W603 '<>' is deprecated, use '!='
+ignore = E123,E124,E126,E221,E226,E401,E502,F402,F403,F812,F821,F822,W291,W293,W391,W603
[pudge]
theme = pythonpaste.org
http://sourceforge.net/p/sqlobject/sqlobject/ci/bdd9c455145c675517dfd1023766c57baf81248d
commit bdd9c455145c675517dfd1023766c57baf81248d
Author: Oleg Broytman <ph...@ph...>
Date: Mon Jan 26 21:30:39 2015 +0300
Fix #23 flake8 E701 multiple statements on one line
diff --git a/setup.cfg b/setup.cfg
index 85d1659..ef3f0d2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -18,8 +18,7 @@ exclude = .git,docs/europython/*.py,ez_setup.py
; E226 missing whitespace around arithmetic operator
; E401 multiple imports on one line
; E502 the backslash is redundant between brackets
-; E701 multiple statements on one line (colon)
-ignore = E123,E124,E126,E221,E226,E401,E502,E701,F
+ignore = E123,E124,E126,E221,E226,E401,E502,F
[pudge]
theme = pythonpaste.org
diff --git a/sqlobject/col.py b/sqlobject/col.py
index c9378c9..a087c8f 100644
--- a/sqlobject/col.py
+++ b/sqlobject/col.py
@@ -206,8 +206,10 @@ class SOCol(object):
self.alternateMethodName = alternateMethodName
_validators = self.createValidators()
- if validator: _validators.append(validator)
- if validator2: _validators.insert(0, validator2)
+ if validator:
+ _validators.append(validator)
+ if validator2:
+ _validators.insert(0, validator2)
_vlen = len(_validators)
if _vlen:
for _validator in _validators:
@@ -1342,7 +1344,8 @@ class SODateCol(SOCol):
def __init__(self, **kw):
dateFormat = kw.pop('dateFormat', None)
- if dateFormat: self.dateFormat = dateFormat
+ if dateFormat:
+ self.dateFormat = dateFormat
super(SODateCol, self).__init__(**kw)
def createValidators(self):
@@ -1685,7 +1688,8 @@ class SOBLOBCol(SOStringCol):
def __init__(self, **kw):
# Change the default from 'auto' to False -
# this is a (mostly) binary column
- if 'varchar' not in kw: kw['varchar'] = False
+ if 'varchar' not in kw:
+ kw['varchar'] = False
super(SOBLOBCol, self).__init__(**kw)
def createValidators(self):
diff --git a/sqlobject/dbconnection.py b/sqlobject/dbconnection.py
index a2a9885..9d0aa81 100644
--- a/sqlobject/dbconnection.py
+++ b/sqlobject/dbconnection.py
@@ -220,7 +220,8 @@ class DBConnection:
user, password = [x and urllib.unquote(x) or None
for x in urllib.splitpasswd(user)]
host, port = urllib.splitport(host)
- if port: port = int(port)
+ if port:
+ port = int(port)
elif host == '':
host = None
diff --git a/sqlobject/dberrors.py b/sqlobject/dberrors.py
index 1e18a42..c14a86b 100644
--- a/sqlobject/dberrors.py
+++ b/sqlobject/dberrors.py
@@ -6,34 +6,45 @@
"""
-class Error(StandardError): pass
+class Error(StandardError):
+ pass
-class Warning(StandardError): pass
+class Warning(StandardError):
+ pass
-class InterfaceError(Error): pass
+class InterfaceError(Error):
+ pass
-class DatabaseError(Error): pass
+class DatabaseError(Error):
+ pass
-class InternalError(DatabaseError): pass
+class InternalError(DatabaseError):
+ pass
-class OperationalError(DatabaseError): pass
+class OperationalError(DatabaseError):
+ pass
-class ProgrammingError(DatabaseError): pass
+class ProgrammingError(DatabaseError):
+ pass
-class IntegrityError(DatabaseError): pass
+class IntegrityError(DatabaseError):
+ pass
-class DataError(DatabaseError): pass
+class DataError(DatabaseError):
+ pass
-class NotSupportedError(DatabaseError): pass
+class NotSupportedError(DatabaseError):
+ pass
-class DuplicateEntryError(IntegrityError): pass
+class DuplicateEntryError(IntegrityError):
+ pass
diff --git a/sqlobject/inheritance/__init__.py b/sqlobject/inheritance/__init__.py
index 9e0aa1a..5bc9cae 100644
--- a/sqlobject/inheritance/__init__.py
+++ b/sqlobject/inheritance/__init__.py
@@ -108,8 +108,10 @@ class InheritableSQLMeta(sqlmeta):
if sqlmeta.parentClass:
for col in sqlmeta.parentClass.sqlmeta.columnList:
cname = col.name
- if cname == 'childName': continue
- if cname.endswith("ID"): cname = cname[:-2]
+ if cname == 'childName':
+ continue
+ if cname.endswith("ID"):
+ cname = cname[:-2]
setattr(soClass, getterName(cname), eval(
'lambda self: self._parent.%s' % cname))
if not col.immutable:
@@ -144,7 +146,8 @@ class InheritableSQLMeta(sqlmeta):
for c in sqlmeta.childClasses.values():
c.sqlmeta.addColumn(columnDef, connection=connection,
childUpdate=True)
- if q: setattr(c.q, columnDef.name, q)
+ if q:
+ setattr(c.q, columnDef.name, q)
@classmethod
def delColumn(sqlmeta, column, changeSchema=False, connection=None,
@@ -305,7 +308,8 @@ class InheritableSQLObject(SQLObject):
selectResults)
# DSM: If we are updating a child, we should never return a child...
- if childUpdate: return val
+ if childUpdate:
+ return val
# DSM: If this class has a child, return the child
if 'childName' in cls.sqlmeta.columns:
childName = val.childName
diff --git a/sqlobject/inheritance/iteration.py b/sqlobject/inheritance/iteration.py
index 9f4e5c0..25f97a9 100644
--- a/sqlobject/inheritance/iteration.py
+++ b/sqlobject/inheritance/iteration.py
@@ -25,7 +25,8 @@ class InheritableIteration(Iteration):
def next(self):
if not self._results:
self._results = list(self.cursor.fetchmany())
- if not self.lazyColumns: self.fetchChildren()
+ if not self.lazyColumns:
+ self.fetchChildren()
if not self._results:
self._cleanup()
raise StopIteration
diff --git a/sqlobject/main.py b/sqlobject/main.py
index dc0fd7d..7ad2267 100644
--- a/sqlobject/main.py
+++ b/sqlobject/main.py
@@ -56,10 +56,12 @@ is created. See SQLObject._create
NoDefault = sqlbuilder.NoDefault
-class SQLObjectNotFound(LookupError): pass
+class SQLObjectNotFound(LookupError):
+ pass
-class SQLObjectIntegrityError(Exception): pass
+class SQLObjectIntegrityError(Exception):
+ pass
def makeProperties(obj):
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index f1645fc..099958a 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -206,7 +206,8 @@ class Command(object):
# contamination.
# yemartin - 2006-08-08
- class SQLObjectCircularReferenceError(Exception): pass
+ class SQLObjectCircularReferenceError(Exception):
+ pass
def findReverseDependencies(cls):
"""
diff --git a/sqlobject/mssql/mssqlconnection.py b/sqlobject/mssql/mssqlconnection.py
index ac94a0d..cfbdec3 100644
--- a/sqlobject/mssql/mssqlconnection.py
+++ b/sqlobject/mssql/mssqlconnection.py
@@ -78,7 +78,8 @@ class MSSQLConnection(DBAPI):
('port', keys.port),
('database', keys.db),
):
- if value: keys_dict[attr] = value
+ if value:
+ keys_dict[attr] = value
return keys_dict
self.make_conn_str = _make_conn_str
@@ -263,9 +264,12 @@ class MSSQLConnection(DBAPI):
if defaultText[0] == "'":
defaultText = defaultText[1:-1]
else:
- if t == "int" : defaultText = int(defaultText)
- if t == "float" : defaultText = float(defaultText)
- if t == "numeric": defaultText = float(defaultText)
+ if t == "int" :
+ defaultText = int(defaultText)
+ if t == "float" :
+ defaultText = float(defaultText)
+ if t == "numeric":
+ defaultText = float(defaultText)
# TODO need to access the "column" to_python method here --
# but the object doesn't exists yet.
diff --git a/sqlobject/mysql/mysqlconnection.py b/sqlobject/mysql/mysqlconnection.py
index ad54e03..512e36e 100644
--- a/sqlobject/mysql/mysqlconnection.py
+++ b/sqlobject/mysql/mysqlconnection.py
@@ -230,7 +230,8 @@ class MySQLConnection(DBAPI):
colClass, kw = self.guessClass(t)
if self.kw.get('use_unicode') and colClass is col.StringCol:
colClass = col.UnicodeCol
- if self.dbEncoding: kw['dbEncoding'] = self.dbEncoding
+ if self.dbEncoding:
+ kw['dbEncoding'] = self.dbEncoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['dbName'] = field
diff --git a/sqlobject/postgres/pgconnection.py b/sqlobject/postgres/pgconnection.py
index 4ed83a5..d7fe8cb 100644
--- a/sqlobject/postgres/pgconnection.py
+++ b/sqlobject/postgres/pgconnection.py
@@ -155,7 +155,8 @@ class PostgresConnection(DBAPI):
# For printDebug in _executeRetry
self._connectionNumbers[id(conn)] = self._connectionCount
- if self.autoCommit: self._setAutoCommit(conn, 1)
+ if self.autoCommit:
+ self._setAutoCommit(conn, 1)
c = conn.cursor()
if self.schema:
self._executeRetry(conn, c, "SET search_path TO " + self.schema)
diff --git a/sqlobject/sqlbuilder.py b/sqlobject/sqlbuilder.py
index 24eb9f3..0377520 100644
--- a/sqlobject/sqlbuilder.py
+++ b/sqlobject/sqlbuilder.py
@@ -754,9 +754,11 @@ class Select(SQLExpression):
tables.update(tablesUsedSet(thing, db))
for j in join:
t1 = _str_or_sqlrepr(j.table1, db)
- if t1 in tables: tables.remove(t1)
+ if t1 in tables:
+ tables.remove(t1)
t2 = _str_or_sqlrepr(j.table2, db)
- if t2 in tables: tables.remove(t2)
+ if t2 in tables:
+ tables.remove(t2)
if tables:
select += " FROM %s" % ", ".join(sorted(tables))
elif join:
@@ -1563,6 +1565,7 @@ if __name__ == "__main__":
>>> Replace(table.address, [("BOB", "3049 N. 18th St."), ("TIM", "409 S. 10th St.")], template=('name', 'address'))
""" # noqa: allow long (> 79) lines
for expr in tests.split('\n'):
- if not expr.strip(): continue
+ if not expr.strip():
+ continue
if expr.startswith('>>> '):
expr = expr[4:]
diff --git a/sqlobject/sqlite/sqliteconnection.py b/sqlobject/sqlite/sqliteconnection.py
index 89400b0..2f398c1 100644
--- a/sqlobject/sqlite/sqliteconnection.py
+++ b/sqlobject/sqlite/sqliteconnection.py
@@ -360,9 +360,11 @@ class SQLiteConnection(DBAPI):
colData = colData[0].split('(', 1)[1].strip()[:-2]
while True:
start = colData.find('(')
- if start == -1: break
+ if start == -1:
+ break
end = colData.find(')', start)
- if end == -1: break
+ if end == -1:
+ break
colData = colData[:start] + colData[end+1:]
results = []
for colDesc in colData.split(','):
diff --git a/sqlobject/versioning/__init__.py b/sqlobject/versioning/__init__.py
index 7c08ebb..a6a4141 100644
--- a/sqlobject/versioning/__init__.py
+++ b/sqlobject/versioning/__init__.py
@@ -53,7 +53,8 @@ def getColumns(columns, cls):
# remove incompatible constraints
kwds = dict(defi._kw)
for kw in ["alternateID", "unique"]:
- if kw in kwds: del kwds[kw]
+ if kw in kwds:
+ del kwds[kw]
columns[column] = defi.__class__(**kwds)
# ascend heirarchy
http://sourceforge.net/p/sqlobject/sqlobject/ci/86bbf2cc2f501dddad230797f70e02e78fb3c193
commit 86bbf2cc2f501dddad230797f70e02e78fb3c193
Author: Oleg Broytman <ph...@ph...>
Date: Sat Jan 24 12:18:54 2015 +0300
Fix #11 flake8 E302 expected 2 blank lines
diff --git a/docs/interface.py b/docs/interface.py
index 0a57f8a..6bd4a68 100644
--- a/docs/interface.py
+++ b/docs/interface.py
@@ -4,9 +4,11 @@ provides. While its in the form of a formal interface, it doesn't
use any interface system.
"""
+
class Interface(object):
pass
+
class ISQLObject(Interface):
sqlmeta = """
@@ -125,6 +127,7 @@ class ISQLObject(Interface):
configured database connection.
"""
+
class Isqlmeta(Interface):
table = """
@@ -287,6 +290,7 @@ class ICol(Interface):
object is assigned to.
"""
+
class ISOCol(Interface):
"""
diff --git a/docs/test.py b/docs/test.py
index 4e228e8..a6e475e 100644
--- a/docs/test.py
+++ b/docs/test.py
@@ -4,6 +4,7 @@ import doctest
sys.path.insert(
0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
def test():
for doc in ['SQLObject.txt']:
doctest.testfile(doc, optionflags=doctest.ELLIPSIS)
diff --git a/setup.cfg b/setup.cfg
index f59c08a..85d1659 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,11 +16,10 @@ exclude = .git,docs/europython/*.py,ez_setup.py
; E126 continuation line over-indented for hanging indent
; E221 multiple spaces before operator
; E226 missing whitespace around arithmetic operator
-; E302 expected 2 blank lines, found <n>
; E401 multiple imports on one line
; E502 the backslash is redundant between brackets
; E701 multiple statements on one line (colon)
-ignore = E123,E124,E126,E221,E226,E302,E401,E502,E701,F
+ignore = E123,E124,E126,E221,E226,E401,E502,E701,F
[pudge]
theme = pythonpaste.org
diff --git a/sqlobject/boundattributes.py b/sqlobject/boundattributes.py
index b6b013f..72d1c5d 100644
--- a/sqlobject/boundattributes.py
+++ b/sqlobject/boundattributes.py
@@ -29,6 +29,7 @@ __all__ = ['BoundAttribute', 'BoundFactory', 'bind_attributes',
import declarative
import events
+
class BoundAttribute(declarative.Declarative):
"""
@@ -114,6 +115,7 @@ class BoundAttribute(declarative.Declarative):
self.__dict__['_all_attrs'] = self._add_attrs(self, {name: value})
self.__dict__[name] = value
+
class BoundFactory(BoundAttribute):
"""
diff --git a/sqlobject/cache.py b/sqlobject/cache.py
index 736e0e7..690b137 100644
--- a/sqlobject/cache.py
+++ b/sqlobject/cache.py
@@ -9,6 +9,7 @@ objects in a cache that doesn't allow them to be garbage collected
import threading
from weakref import ref
+
class CacheFactory(object):
"""
@@ -277,6 +278,7 @@ class CacheFactory(object):
all.append(value())
return all
+
class CacheSet(object):
"""
diff --git a/sqlobject/classregistry.py b/sqlobject/classregistry.py
index 7681718..132afef 100644
... 6523 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|