Skip to content

Commit

Permalink
Aligned the spelling of 'boolean' in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cafferata committed Feb 12, 2018
1 parent 89d52c1 commit ed85d81
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion ckan/lib/helpers.py
Expand Up @@ -1891,7 +1891,7 @@ def groups_available(am_member=False):
member of, otherwise return all groups that the user is authorized to
edit (for example, sysadmin users are authorized to edit all groups)
(optional, default: False)
:type am-member: boolean
:type am-member: bool
'''
context = {}
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/redis.py
Expand Up @@ -52,7 +52,7 @@ def is_redis_available():
Check whether Redis is available.
:returns: The availability of Redis.
:rtype: boolean
:rtype: bool
.. seealso:: :py:func:`connect_to_redis`
'''
Expand Down
4 changes: 2 additions & 2 deletions ckan/logic/action/delete.py
Expand Up @@ -357,7 +357,7 @@ def _group_or_org_delete(context, data_dict, is_org=False):
if not authz.check_config_permission('ckan.auth.create_unowned_dataset'):
raise ValidationError(_('Organization cannot be deleted while it '
'still has datasets'))

pkg_table = model.package_table
# using Core SQLA instead of the ORM should be faster
model.Session.execute(
Expand Down Expand Up @@ -428,7 +428,7 @@ def _group_or_org_purge(context, data_dict, is_org=False):
:param is_org: you should pass is_org=True if purging an organization,
otherwise False (optional, default: False)
:type is_org: boolean
:type is_org: bool
'''
model = context['model']
Expand Down
78 changes: 39 additions & 39 deletions ckan/logic/action/get.py
Expand Up @@ -97,7 +97,7 @@ def _package_list_with_resources(context, package_revision_list):
def site_read(context, data_dict=None):
'''Return ``True``.
:rtype: boolean
:rtype: bool
'''
_check_access('site_read', context, data_dict)
return True
Expand Down Expand Up @@ -453,22 +453,22 @@ def group_list(context, data_dict):
property for each group is deprecated, but there is a count of the
packages in the `package_count` property.
(optional, default: ``False``)
:type all_fields: boolean
:type all_fields: bool
:param include_dataset_count: if all_fields, include the full package_count
(optional, default: ``True``)
:type include_dataset_count: boolean
:type include_dataset_count: bool
:param include_extras: if all_fields, include the group extra fields
(optional, default: ``False``)
:type include_extras: boolean
:type include_extras: bool
:param include_tags: if all_fields, include the group tags
(optional, default: ``False``)
:type include_tags: boolean
:type include_tags: bool
:param include_groups: if all_fields, include the groups the groups are in
(optional, default: ``False``).
:type include_groups: boolean
:type include_groups: bool
:param include_users: if all_fields, include the group users
(optional, default: ``False``).
:type include_users: boolean
:type include_users: bool
:rtype: list of strings
'''
Expand Down Expand Up @@ -503,23 +503,23 @@ def organization_list(context, data_dict):
property for each group is deprecated, but there is a count of the
packages in the `package_count` property.
(optional, default: ``False``)
:type all_fields: boolean
:type all_fields: bool
:param include_dataset_count: if all_fields, include the full package_count
(optional, default: ``True``)
:type include_dataset_count: boolean
:type include_dataset_count: bool
:param include_extras: if all_fields, include the organization extra fields
(optional, default: ``False``)
:type include_extras: boolean
:type include_extras: bool
:param include_tags: if all_fields, include the organization tags
(optional, default: ``False``)
:type include_tags: boolean
:type include_tags: bool
:param include_groups: if all_fields, include the organizations the
organizations are in
(optional, default: ``False``)
:type all_fields: boolean
:type all_fields: bool
:param include_users: if all_fields, include the organization users
(optional, default: ``False``).
:type include_users: boolean
:type include_users: bool
:rtype: list of strings
Expand All @@ -535,13 +535,13 @@ def group_list_authz(context, data_dict):
:param available_only: remove the existing groups in the package
(optional, default: ``False``)
:type available_only: boolean
:type available_only: bool
:param am_member: if ``True`` return only the groups the logged-in user is
a member of, otherwise return all groups that the user is authorized to
edit (for example, sysadmin users are authorized to edit all groups)
(optional, default: ``False``)
:type am-member: boolean
:type am-member: bool
:returns: list of dictized groups that the user is authorized to edit
:rtype: list of dicts
Expand Down Expand Up @@ -630,7 +630,7 @@ def organization_list_for_user(context, data_dict):
:type permission: string
:param include_dataset_count: include the package_count in each org
(optional, default: ``False``)
:type include_dataset_count: boolean
:type include_dataset_count: bool
:returns: list of organizations that the user has the given permission for
:rtype: list of dicts
Expand Down Expand Up @@ -786,7 +786,7 @@ def tag_list(context, data_dict):
:type vocabulary_id: string
:param all_fields: return full tag dictionaries instead of just names
(optional, default: ``False``)
:type all_fields: boolean
:type all_fields: bool
:rtype: list of dictionaries
Expand Down Expand Up @@ -828,7 +828,7 @@ def user_list(context, data_dict):
:type order_by: string
:param all_fields: return full user dictionaries instead of just names.
(optional, default: ``True``)
:type all_fields: boolean
:type all_fields: bool
:rtype: list of user dictionaries. User properties include:
``number_of_edits`` which counts the revisions by the user and
Expand Down Expand Up @@ -1286,25 +1286,25 @@ def group_show(context, data_dict):
:type id: string
:param include_datasets: include a truncated list of the group's datasets
(optional, default: ``False``)
:type include_datasets: boolean
:type include_datasets: bool
:param include_dataset_count: include the full package_count
(optional, default: ``True``)
:type include_dataset_count: boolean
:type include_dataset_count: bool
:param include_extras: include the group's extra fields
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_users: include the group's users
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_groups: include the group's sub groups
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_tags: include the group's tags
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_followers: include the group's number of followers
(optional, default: ``True``)
:type id: boolean
:type id: bool
:rtype: dictionary
Expand All @@ -1321,25 +1321,25 @@ def organization_show(context, data_dict):
:type id: string
:param include_datasets: include a truncated list of the org's datasets
(optional, default: ``False``)
:type include_datasets: boolean
:type include_datasets: bool
:param include_dataset_count: include the full package_count
(optional, default: ``True``)
:type include_dataset_count: boolean
:type include_dataset_count: bool
:param include_extras: include the organization's extra fields
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_users: include the organization's users
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_groups: include the organization's sub groups
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_tags: include the organization's tags
(optional, default: ``True``)
:type id: boolean
:type id: bool
:param include_followers: include the organization's number of followers
(optional, default: ``True``)
:type id: boolean
:type id: bool
:rtype: dictionary
Expand Down Expand Up @@ -1436,13 +1436,13 @@ def user_show(context, data_dict):
If it is the same user or a sysadmin requesting, it includes datasets
that are draft or private.
(optional, default:``False``, limit:50)
:type include_datasets: boolean
:type include_datasets: bool
:param include_num_followers: Include the number of followers the user has
(optional, default:``False``)
:type include_num_followers: boolean
:type include_num_followers: bool
:param include_password_hash: Include the stored password hash
(sysadmin only, optional, default:``False``)
:type include_password_hash: boolean
:type include_password_hash: bool
:returns: the details of the user. Includes email_hash, number_of_edits and
number_created_packages (which excludes draft or private datasets
Expand Down Expand Up @@ -2435,7 +2435,7 @@ def get_site_user(context, data_dict):
is responsible for commiting transaction after get_site_user is
called. Leaving open connections can cause cli commands to hang!
(optional, default: ``False``)
:type defer_commit: boolean
:type defer_commit: bool
'''
_check_access('get_site_user', context, data_dict)
model = context['model']
Expand Down Expand Up @@ -3035,7 +3035,7 @@ def am_following_user(context, data_dict):
:param id: the id or name of the user
:type id: string
:rtype: boolean
:rtype: bool
'''
return _am_following(
Expand All @@ -3050,7 +3050,7 @@ def am_following_dataset(context, data_dict):
:param id: the id or name of the dataset
:type id: string
:rtype: boolean
:rtype: bool
'''
return _am_following(
Expand All @@ -3065,7 +3065,7 @@ def am_following_group(context, data_dict):
:param id: the id or name of the group
:type id: string
:rtype: boolean
:rtype: bool
'''
return _am_following(
Expand Down
4 changes: 2 additions & 2 deletions ckan/model/group.py
Expand Up @@ -263,14 +263,14 @@ def packages(self, with_private=False, limit=None,
Returns all packages in this group with VDM revision state ACTIVE
:param with_private: if True, include the group's private packages
:type with_private: boolean
:type with_private: bool
:param limit: the maximum number of packages to return
:type limit: int
:param return_query: if True, return the SQLAlchemy query object
instead of the list of Packages resulting from the query
:type return_query: boolean
:type return_query: bool
:returns: a list of this group's packages
:rtype: list of ckan.model.package.Package objects
Expand Down
2 changes: 1 addition & 1 deletion ckan/plugins/interfaces.py
Expand Up @@ -1105,7 +1105,7 @@ def is_fallback(self):
If no IDatasetForm plugin's ``is_fallback()`` method returns ``True``,
CKAN will use ``DefaultDatasetForm`` as the fallback.
:rtype: boolean
:rtype: bool
'''

Expand Down
2 changes: 1 addition & 1 deletion ckanext/example_theme_docs/custom_config_setting/plugin.py
Expand Up @@ -16,7 +16,7 @@ def show_most_popular_groups():
Returns ``False`` by default, if the setting is not in the config file.
:rtype: boolean
:rtype: bool
'''
value = config.get('ckan.example_theme.show_most_popular_groups', False)
Expand Down

0 comments on commit ed85d81

Please sign in to comment.