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 62156a3c41349b4d310fc15dc065fed17c7bf7f8 (commit)
via f4ef555f893a5b738b1eb1ac54e8dc566c03abde (commit)
via 99df3a0a3a116a10f9524ec3d3d8c02ab9fff5fd (commit)
via 85bc51c511ef8bd476df5d380038b83c73c2c6fe (commit)
from c93aef83f61769db976871aa479348ad24bd784a (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/62156a3c41349b4d310fc15dc065fed17c7bf7f8
commit 62156a3c41349b4d310fc15dc065fed17c7bf7f8
Author: Oleg Broytman <ph...@ph...>
Date: Tue Nov 27 00:24:04 2018 +0300
Style: Ignore flake8 W504 line break after binary operator
diff --git a/setup.py b/setup.py
index b0fb383..0ebca65 100755
--- a/setup.py
+++ b/setup.py
@@ -74,8 +74,8 @@ and `GitHub <https://github.com/sqlobject>`_.
keywords=["sql", "orm", "object-relational mapper"],
license="LGPL",
platforms="Any",
- packages=["sqlobject"] +
- ['sqlobject.%s' % package for package in subpackages],
+ packages=["sqlobject"]
+ + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
package_data={
"sqlobject.maxdb": ["readme.txt"],
diff --git a/sqlobject/col.py b/sqlobject/col.py
index 6771946..8119539 100644
--- a/sqlobject/col.py
+++ b/sqlobject/col.py
@@ -387,8 +387,8 @@ class SOCol(object):
[self.dbName, self._firebirdType()] + self._extraSQL())
else:
return ' '.join(
- [self.dbName] + [self._firebirdType()[0]] +
- self._extraSQL() + [self._firebirdType()[1]])
+ [self.dbName] + [self._firebirdType()[0]]
+ + self._extraSQL() + [self._firebirdType()[1]])
def maxdbCreateSQL(self):
return ' '.join([self.dbName, self._maxdbType()] + self._extraSQL())
diff --git a/sqlobject/dbconnection.py b/sqlobject/dbconnection.py
index 1f71b1b..fbff457 100644
--- a/sqlobject/dbconnection.py
+++ b/sqlobject/dbconnection.py
@@ -618,9 +618,9 @@ class DBAPI(DBConnection):
def _SO_selectOneAlt(self, so, columnNames, condition):
if columnNames:
- columns = [isinstance(x, string_type) and
- sqlbuilder.SQLConstant(x) or
- x for x in columnNames]
+ columns = [isinstance(x, string_type)
+ and sqlbuilder.SQLConstant(x)
+ or x for x in columnNames]
else:
columns = None
return self.queryOne(self.sqlrepr(sqlbuilder.Select(
@@ -1070,8 +1070,8 @@ class ConnectionURIOpener(object):
def registerConnectionInstance(self, inst):
if inst.name:
- assert (inst.name not in self.instanceNames or
- self.instanceNames[inst.name] is cls # noqa
+ assert (inst.name not in self.instanceNames
+ or self.instanceNames[inst.name] is cls # noqa
), ("A instance has already been registered "
"with the name %s" % inst.name)
assert inst.name.find(':') == -1, \
diff --git a/sqlobject/declarative.py b/sqlobject/declarative.py
index d03a46e..8fe2cbd 100644
--- a/sqlobject/declarative.py
+++ b/sqlobject/declarative.py
@@ -199,8 +199,8 @@ class Declarative(with_metaclass(DeclarativeMeta, object)):
@staticmethod
def _repr_vars(dictNames):
names = [n for n in dictNames
- if not n.startswith('_') and
- n != 'declarative_count']
+ if not n.startswith('_')
+ and n != 'declarative_count']
names.sort()
return names
diff --git a/sqlobject/inheritance/__init__.py b/sqlobject/inheritance/__init__.py
index f340e79..e6c57b4 100644
--- a/sqlobject/inheritance/__init__.py
+++ b/sqlobject/inheritance/__init__.py
@@ -31,8 +31,8 @@ class InheritableSelectResults(SelectResults):
if clause is None or isinstance(clause, str) and clause == 'all':
clause = sqlbuilder.SQLTrueClause
- dbName = (ops.get('connection', None) or
- sourceClass._connection).dbName
+ dbName = (ops.get('connection', None)
+ or sourceClass._connection).dbName
tablesSet = tablesUsedSet(clause, dbName)
tablesSet.add(str(sourceClass.sqlmeta.table))
@@ -415,8 +415,8 @@ class InheritableSQLObject(SQLObject):
# If we are outside a transaction and this is a child,
# destroy the parent
connection = self._connection
- if (not isinstance(connection, dbconnection.Transaction) and
- connection.autoCommit) and self.sqlmeta.parentClass:
+ if (not isinstance(connection, dbconnection.Transaction)
+ and connection.autoCommit) and self.sqlmeta.parentClass:
self._parent.destroySelf()
# TC: Do we need to do this??
self._parent = None
@@ -457,8 +457,8 @@ class InheritableSQLObject(SQLObject):
# if the clause was one of TRUE varians, replace it
if (clause is None) or (clause is sqlbuilder.SQLTrueClause) \
or (
- isinstance(clause, string_type) and
- (clause == 'all')):
+ isinstance(clause, string_type)
+ and (clause == 'all')):
clause = addClause
else:
# patch WHERE condition:
diff --git a/sqlobject/joins.py b/sqlobject/joins.py
index c847e21..afb0f88 100644
--- a/sqlobject/joins.py
+++ b/sqlobject/joins.py
@@ -440,19 +440,19 @@ class SOManyToMany(object):
events.listen(self.event_CreateTableSignal,
self.otherClass, events.CreateTableSignal)
self.clause = (
- (self.otherClass.q.id ==
- sqlbuilder.Field(self.intermediateTable, self.otherColumn)) &
- (sqlbuilder.Field(self.intermediateTable, self.joinColumn) ==
- self.soClass.q.id))
+ (self.otherClass.q.id
+ == sqlbuilder.Field(self.intermediateTable, self.otherColumn))
+ & (sqlbuilder.Field(self.intermediateTable, self.joinColumn)
+ == self.soClass.q.id))
def __get__(self, obj, type):
if obj is None:
return self
query = (
- (self.otherClass.q.id ==
- sqlbuilder.Field(self.intermediateTable, self.otherColumn)) &
- (sqlbuilder.Field(self.intermediateTable, self.joinColumn) ==
- obj.id))
+ (self.otherClass.q.id
+ == sqlbuilder.Field(self.intermediateTable, self.otherColumn))
+ & (sqlbuilder.Field(self.intermediateTable, self.joinColumn)
+ == obj.id))
select = self.otherClass.select(query)
return _ManyToManySelectWrapper(obj, self, select)
@@ -545,15 +545,15 @@ class SOOneToMany(object):
self.joinColumn = styles.getStyle(
self.soClass).tableReference(self.soClass.sqlmeta.table)
self.clause = (
- sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn) ==
- self.soClass.q.id)
+ sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn)
+ == self.soClass.q.id)
def __get__(self, obj, type):
if obj is None:
return self
query = (
- sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn) ==
- obj.id)
+ sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn)
+ == obj.id)
select = self.otherClass.select(query)
return _OneToManySelectWrapper(obj, self, select)
diff --git a/sqlobject/main.py b/sqlobject/main.py
index 88b3c0c..5d9b537 100644
--- a/sqlobject/main.py
+++ b/sqlobject/main.py
@@ -1410,8 +1410,8 @@ class SQLObject(with_metaclass(declarative.DeclarativeMeta, object)):
*[getattr(cls.q, _n) == _v for _n, _v in zip(name, new_value)])
return (connection or cls._connection)._SO_selectOneAlt(
cls,
- [cls.sqlmeta.idName] +
- [column.dbName for column in cls.sqlmeta.columnList],
+ [cls.sqlmeta.idName]
+ + [column.dbName for column in cls.sqlmeta.columnList],
condition), None
@classmethod
@@ -1536,8 +1536,8 @@ class SQLObject(with_metaclass(declarative.DeclarativeMeta, object)):
def createJoinTables(cls, ifNotExists=False, connection=None):
conn = connection or cls._connection
for join in cls._getJoinsToCreate():
- if (ifNotExists and
- conn.tableExists(join.intermediateTable)):
+ if (ifNotExists
+ and conn.tableExists(join.intermediateTable)):
continue
conn._SO_createJoinTable(join)
diff --git a/sqlobject/manager/command.py b/sqlobject/manager/command.py
index e79053f..e9891d9 100755
--- a/sqlobject/manager/command.py
+++ b/sqlobject/manager/command.py
@@ -297,8 +297,8 @@ class Command(with_metaclass(DeclarativeMeta, object)):
if self.description:
self.parser.description = self.description
self.options, self.args = self.parser.parse_args(self.raw_args)
- if (getattr(self.options, 'simulate', False) and
- not self.options.verbose):
+ if (getattr(self.options, 'simulate', False)
+ and not self.options.verbose):
self.options.verbose = 1
if self.min_args is not None and len(self.args) < self.min_args:
self.runner.invalid(
@@ -391,9 +391,9 @@ class Command(with_metaclass(DeclarativeMeta, object)):
else:
for name in dir(module):
value = getattr(module, name)
- if (isinstance(value, type) and
- issubclass(value, sqlobject.SQLObject) and
- value.__module__ == module.__name__):
+ if (isinstance(value, type)
+ and issubclass(value, sqlobject.SQLObject)
+ and value.__module__ == module.__name__):
all.append(value)
return all
@@ -414,8 +414,8 @@ class Command(with_metaclass(DeclarativeMeta, object)):
return None
config_file = self.options.config_file
if appconfig:
- if (not config_file.startswith('egg:') and
- not config_file.startswith('config:')):
+ if (not config_file.startswith('egg:')
+ and not config_file.startswith('config:')):
config_file = 'config:' + config_file
return appconfig(config_file,
relative_to=os.getcwd())
@@ -446,9 +446,9 @@ class Command(with_metaclass(DeclarativeMeta, object)):
possible_sections = []
for section in p.sections():
name = section.strip().lower()
- if (conf_section == name or
- (conf_section == name.split(':')[-1] and
- name.split(':')[0] in ('app', 'application'))):
+ if (conf_section == name
+ or (conf_section == name.split(':')[-1]
+ and name.split(':')[0] in ('app', 'application'))):
possible_sections.append(section)
if not possible_sections:
@@ -514,8 +514,8 @@ class Command(with_metaclass(DeclarativeMeta, object)):
def load_options_from_egg(self, egg_spec):
dist, conf = self.config_from_egg(egg_spec)
- if (hasattr(self.options, 'output_dir') and
- not self.options.output_dir and conf.get('history_dir')):
+ if (hasattr(self.options, 'output_dir')
+ and not self.options.output_dir and conf.get('history_dir')):
dir = conf['history_dir']
dir = dir.replace('$base', dist.location)
self.options.output_dir = dir
@@ -653,8 +653,8 @@ class CommandCreate(Command):
dbs_created = []
constraints = {}
for soClass in self.classes(require_some=True):
- if (self.options.create_db and
- soClass._connection not in dbs_created):
+ if (self.options.create_db
+ and soClass._connection not in dbs_created):
if not self.options.simulate:
try:
soClass._connection.createEmptyDatabase()
@@ -1007,8 +1007,8 @@ class CommandRecord(Command):
f = open(os.path.join(last_version_dir, fn), 'r')
content = f.read()
f.close()
- if (self.strip_comments(files_copy[fn]) !=
- self.strip_comments(content)):
+ if (self.strip_comments(files_copy[fn])
+ != self.strip_comments(content)):
if v > 1:
print("Content does not match: %s" % fn)
break
@@ -1063,8 +1063,8 @@ class CommandRecord(Command):
print("Cannot edit upgrader because there is no "
"previous version")
else:
- breaker = ('-' * 20 + ' lines below this will be ignored ' +
- '-' * 20)
+ breaker = ('-' * 20 + ' lines below this will be ignored '
+ + '-' * 20)
pre_text = breaker + '\n' + '\n'.join(all_diffs)
text = self.open_editor('\n\n' + pre_text, breaker=breaker,
extension='.sql')
@@ -1117,8 +1117,8 @@ class CommandRecord(Command):
def find_output_dir(self):
today = time.strftime('%Y-%m-%d', time.localtime())
if self.options.version_name:
- dir = os.path.join(self.base_dir(), today + '-' +
- self.options.version_name)
+ dir = os.path.join(self.base_dir(), today + '-'
+ + self.options.version_name)
if os.path.exists(dir):
print("Error, directory already exists: %s"
% dir)
diff --git a/sqlobject/postgres/pgconnection.py b/sqlobject/postgres/pgconnection.py
index b567f99..8dd1db5 100644
--- a/sqlobject/postgres/pgconnection.py
+++ b/sqlobject/postgres/pgconnection.py
@@ -249,8 +249,8 @@ class PostgresConnection(DBAPI):
except self.module.ProgrammingError as e:
msg = ErrorMessage(e)
if (
- (len(e.args) > 2) and (e.args[1] == 'ERROR') and
- (e.args[2] == '23505')) \
+ (len(e.args) > 2) and (e.args[1] == 'ERROR')
+ and (e.args[2] == '23505')) \
or ((len(e.args) >= 2) and (e.args[1] == '23505')):
raise dberrors.DuplicateEntryError(msg)
else:
diff --git a/sqlobject/sqlite/sqliteconnection.py b/sqlobject/sqlite/sqliteconnection.py
index fbb07a5..db83eee 100644
--- a/sqlobject/sqlite/sqliteconnection.py
+++ b/sqlobject/sqlite/sqliteconnection.py
@@ -170,8 +170,8 @@ class SQLiteConnection(DBAPI):
return
threadid = self._threadOrigination.get(id(conn))
DBAPI.releaseConnection(self, conn, explicit=explicit)
- if (self._pool is not None and threadid and
- threadid not in self._threadPool):
+ if (self._pool is not None and threadid
+ and threadid not in self._threadPool):
self._threadPool[threadid] = conn
else:
if self._pool and conn in self._pool:
diff --git a/sqlobject/sresults.py b/sqlobject/sresults.py
index 9abfa89..4573cd1 100644
--- a/sqlobject/sresults.py
+++ b/sqlobject/sresults.py
@@ -214,8 +214,8 @@ class SelectResults(object):
""" Counting elements of current select results """
assert not self.ops.get('start') and not self.ops.get('end'), \
"start/end/limit have no meaning with 'count'"
- assert not (self.ops.get('distinct') and
- (self.ops.get('start') or self.ops.get('end'))), \
+ assert not (self.ops.get('distinct')
+ and (self.ops.get('start') or self.ops.get('end'))), \
"distinct-counting of sliced objects is not supported"
if self.ops.get('distinct'):
# Column must be specified, so we are using unique ID column.
diff --git a/sqlobject/tests/dbtest.py b/sqlobject/tests/dbtest.py
index 545c385..b1cf6e4 100644
--- a/sqlobject/tests/dbtest.py
+++ b/sqlobject/tests/dbtest.py
@@ -122,11 +122,8 @@ except Exception as e:
else:
if (connection.dbName == 'firebird') \
or (
- (connection.dbName == 'mysql') and
- (
- (os.environ.get('APPVEYOR')) or
- (os.environ.get('TRAVIS'))
- )
+ (connection.dbName == 'mysql')
+ and ((os.environ.get('APPVEYOR')) or (os.environ.get('TRAVIS')))
):
use_microseconds(False)
diff --git a/sqlobject/tests/test_ForeignKey.py b/sqlobject/tests/test_ForeignKey.py
index 0e80275..50715ef 100644
--- a/sqlobject/tests/test_ForeignKey.py
+++ b/sqlobject/tests/test_ForeignKey.py
@@ -71,8 +71,8 @@ def test1():
assert s.count() == 1
assert s[0] == w1
s = SOTestWorkKey.select(
- (SOTestWorkKey.q.composer == c) &
- (SOTestWorkKey.q.title == 'Symphony No. 9'))
+ (SOTestWorkKey.q.composer == c)
+ & (SOTestWorkKey.q.title == 'Symphony No. 9'))
assert s.count() == 1
assert s[0] == w1
diff --git a/sqlobject/tests/test_auto.py b/sqlobject/tests/test_auto.py
index a97e1a8..1b66821 100644
--- a/sqlobject/tests/test_auto.py
+++ b/sqlobject/tests/test_auto.py
@@ -48,8 +48,8 @@ class TestPeople:
nickname = StringCol('nickname', length=10)
Person.sqlmeta.addColumn(nickname, changeSchema=True)
Person(name='robert', nickname='bob')
- assert ([p.name for p in Person.select('all')] ==
- ['bob', 'jake', 'jane', 'robert', 'tim'])
+ assert ([p.name for p in Person.select('all')]
+ == ['bob', 'jake', 'jane', 'robert', 'tim'])
Person.sqlmeta.delColumn(nickname, changeSchema=True)
def test_dynamicJoin(self):
diff --git a/sqlobject/tests/test_declarative.py b/sqlobject/tests/test_declarative.py
index 3bd452b..4c75be6 100644
--- a/sqlobject/tests/test_declarative.py
+++ b/sqlobject/tests/test_declarative.py
@@ -41,8 +41,8 @@ class B1(Declarative):
def add_attrs(old_attrs, new_attrs):
old_attrs = old_attrs[:]
for name in new_attrs.keys():
- if (name in old_attrs or name.startswith('_') or
- name in ('add_attrs', 'declarative_count', 'attrs')):
+ if (name in old_attrs or name.startswith('_')
+ or name in ('add_attrs', 'declarative_count', 'attrs')):
continue
old_attrs.append(name)
old_attrs.sort()
diff --git a/sqlobject/tests/test_joins.py b/sqlobject/tests/test_joins.py
index 684d2a9..9cc7c19 100644
--- a/sqlobject/tests/test_joins.py
+++ b/sqlobject/tests/test_joins.py
@@ -111,8 +111,8 @@ class TestJoin2:
def test_defaultOrder(self):
p1 = PersonJoiner2.byName('bob')
- assert ([i.zip for i in p1.addressJoiner2s] ==
- ['33333', '22222', '11111'])
+ assert ([i.zip for i in p1.addressJoiner2s]
+ == ['33333', '22222', '11111'])
_personJoiner3_getters = []
diff --git a/sqlobject/tests/test_new_joins.py b/sqlobject/tests/test_new_joins.py
index 3a97e98..82d27d3 100644
--- a/sqlobject/tests/test_new_joins.py
+++ b/sqlobject/tests/test_new_joins.py
@@ -116,8 +116,8 @@ class TestJoin2:
def test_defaultOrder(self):
p1 = PersonJNew2.byName('bob')
- assert ([i.zip for i in p1.addressJ2s] ==
- ['33333', '22222', '11111'])
+ assert ([i.zip for i in p1.addressJ2s]
+ == ['33333', '22222', '11111'])
_personJ3_getters = []
diff --git a/sqlobject/tests/test_transactions.py b/sqlobject/tests/test_transactions.py
index 091de47..b9ac500 100644
--- a/sqlobject/tests/test_transactions.py
+++ b/sqlobject/tests/test_transactions.py
@@ -53,8 +53,8 @@ def test_transaction():
SOTestSOTrans(name='joe', connection=trans)
trans.rollback()
trans.begin()
- assert ([n.name for n in SOTestSOTrans.select(connection=trans)] ==
- ['bob', 'tim'])
+ assert ([n.name for n in SOTestSOTrans.select(connection=trans)]
+ == ['bob', 'tim'])
b = SOTestSOTrans.byName('bob', connection=trans)
b.name = 'robert'
trans.commit()
diff --git a/sqlobject/util/csvimport.py b/sqlobject/util/csvimport.py
index ba0fa0d..e2ec686 100644
--- a/sqlobject/util/csvimport.py
+++ b/sqlobject/util/csvimport.py
@@ -88,8 +88,8 @@ def create_data(data, class_getter, keyorder=None):
"""
objects = {}
classnames = data.keys()
- if (not keyorder and isinstance(class_getter, types.ModuleType) and
- hasattr(class_getter, 'soClasses')):
+ if (not keyorder and isinstance(class_getter, types.ModuleType)
+ and hasattr(class_getter, 'soClasses')):
keyorder = [c.__name__ for c in class_getter.soClasses]
if not keyorder:
classnames.sort()
http://sourceforge.net/p/sqlobject/sqlobject/ci/f4ef555f893a5b738b1eb1ac54e8dc566c03abde
commit f4ef555f893a5b738b1eb1ac54e8dc566c03abde
Author: Oleg Broytman <ph...@ph...>
Date: Tue Nov 27 00:11:38 2018 +0300
Style: Ignore flake8 W605 invalid escape sequence
flake8 is overzealous marking `re.search('\s+')` as invalid.
diff --git a/setup.cfg b/setup.cfg
index 6f87a78..461bc50 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -13,5 +13,6 @@ tag_svn_revision = 0
exclude = .git,.tox,docs/europython/*.py
# E305: expected 2 blank lines after class or function definition, found 1
... 77 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|