Skip to content

Commit

Permalink
[#1149] Fix some pep8 issues and problems with pip requirements on tr…
Browse files Browse the repository at this point in the history
…avis
  • Loading branch information
domoritz authored and amercader committed Aug 5, 2013
1 parent 62dc6f3 commit f7bf360
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion bin/travis-build
Expand Up @@ -23,7 +23,9 @@ sudo -u postgres psql -c "CREATE USER datastore_default WITH PASSWORD 'pass';"
sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;'
sudo -u postgres psql -c 'CREATE DATABASE datastore_test WITH OWNER ckan_default;'

pip install -r requirements.txt -r dev-requirements.txt --use-mirrors
export PIP_USE_MIRRORS=true
pip install -r requirements.txt
pip install -r dev-requirements.txt

python setup.py develop

Expand Down
20 changes: 10 additions & 10 deletions ckan/controllers/feed.py
Expand Up @@ -195,14 +195,14 @@ def group(self, id):
alternate_url = self._alternate_url(params, groups=id)

return self.output_feed(results,
feed_title=u'%s - Group: "%s"' % (g.site_title,
group_dict['title']),
feed_title=u'%s - Group: "%s"' %
(g.site_title, group_dict['title']),
feed_description=u'Recently created or '
'updated datasets on %s by group: "%s"' %
(g.site_title, group_dict['title']),
feed_link=alternate_url,
feed_guid=_create_atom_id(
u'/feeds/groups/%s.atom' % id),
feed_guid=_create_atom_id
(u'/feeds/groups/%s.atom' % id),
feed_url=feed_url,
navigation_urls=navigation_urls)

Expand Down Expand Up @@ -233,8 +233,8 @@ def tag(self, id):
'updated datasets on %s by tag: "%s"' %
(g.site_title, id),
feed_link=alternate_url,
feed_guid=_create_atom_id(
u'/feeds/tag/%s.atom' % id),
feed_guid=_create_atom_id
(u'/feeds/tag/%s.atom' % id),
feed_url=feed_url,
navigation_urls=navigation_urls)

Expand All @@ -261,8 +261,8 @@ def general(self):
feed_description=u'Recently created or '
'updated datasets on %s' % g.site_title,
feed_link=alternate_url,
feed_guid=_create_atom_id(
u'/feeds/dataset.atom'),
feed_guid=_create_atom_id
(u'/feeds/dataset.atom'),
feed_url=feed_url,
navigation_urls=navigation_urls)

Expand Down Expand Up @@ -315,8 +315,8 @@ def custom(self):
' datasets on %s. Custom query: \'%s\'' %
(g.site_title, q),
feed_link=alternate_url,
feed_guid=_create_atom_id(
u'/feeds/custom.atom?%s' % search_url_params),
feed_guid=_create_atom_id
(u'/feeds/custom.atom?%s' % search_url_params),
feed_url=feed_url,
navigation_urls=navigation_urls)

Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/db.py
Expand Up @@ -516,7 +516,7 @@ def alter_table(context, data_dict):
raise ValidationError({
'fields': [('Supplied field "{0}" not '
'present or in wrong order').format(
field['id'])]
field['id'])]
})
## no need to check type as field already defined.
continue
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/tests/test_dump.py
Expand Up @@ -41,7 +41,7 @@ def setup_class(cls):
'nested': ['b', {'moo': 'moo'}],
u'characters': [u'Princess Anna', u'Sergius']},
{u'b\xfck': 'warandpeace', 'author': 'tolstoy',
'nested': {'a': 'b'}}]
'nested': {'a': 'b'}}]
}
postparams = '%s=1' % json.dumps(cls.data)
auth = {'Authorization': str(cls.sysadmin_user.apikey)}
Expand Down

0 comments on commit f7bf360

Please sign in to comment.