From 9ab2d20427c67a2a2aadb4aeaa6fe046012edd65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 4 Jun 2016 11:52:42 +0300 Subject: Replace some uses of re.sub with str.lstrip/replace --- lib/sqlalchemy/dialects/postgresql/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 1bc4409f2..e25ec9aea 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -2085,7 +2085,7 @@ class PGDialect(default.DefaultDialect): attype = re.sub(r'\(.*\)', '', format_type) # strip '[]' from integer[], etc. - attype = re.sub(r'\[\]', '', attype) + attype = attype.replace('[]', '') nullable = not notnull is_array = format_type.endswith('[]') -- cgit v1.2.1