Skip to content

Commit

Permalink
style: automatic reformat
Browse files Browse the repository at this point in the history
auto reformat with ruff/docformatter/prettier after config changes
  • Loading branch information
alycejenni committed Oct 30, 2024
1 parent 9eb410f commit f850256
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
13 changes: 7 additions & 6 deletions ckanext/webview/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Created by the Natural History Museum in London, UK

from ckan.plugins import SingletonPlugin, implements, interfaces, toolkit

from ckanext.webview.logic.validators import is_valid_url, not_datastore

ignore_empty = toolkit.get_validator('ignore_empty')
Expand All @@ -20,8 +21,8 @@ class WebviewPlugin(SingletonPlugin):

## IConfigurer
def update_config(self, config):
toolkit.add_template_directory(config, u'theme/templates')
toolkit.add_resource(u'theme/assets', u'ckanext-webview')
toolkit.add_template_directory(config, 'theme/templates')
toolkit.add_resource('theme/assets', 'ckanext-webview')

## IResourceView
def info(self):
Expand All @@ -46,15 +47,15 @@ def setup_template_variables(self, context, data_dict):
return {'web_url': web_url}

def view_template(self, context, data_dict):
'''
"""
:param context:
:param data_dict:
'''
"""
return 'views/web_view.html'

def form_template(self, context, data_dict):
'''
"""
:param context:
:param data_dict:
'''
"""
return 'views/web_view_form.html'
1 change: 0 additions & 1 deletion docs/_scripts/gen_api_pages.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# !/usr/bin/env python
# encoding: utf-8

"""
Generate the code reference pages and navigation.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_validators.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from unittest.mock import MagicMock

import pytest
from ckanext.webview.logic.validators import is_valid_url, not_datastore

from ckan.plugins import toolkit

from ckanext.webview.logic.validators import is_valid_url, not_datastore


class TestIsValidURL(object):
def test_valid_https(self):
Expand Down

0 comments on commit f850256

Please sign in to comment.