Skip to content

Commit

Permalink
docs: fill some empty parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
alycejenni committed Oct 31, 2024
1 parent 7c80e93 commit 751b4f6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ckanext/attribution/commands/migration/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ def split(self, txt):
Uses multiple sub-methods to attempt to split the text into individual
contributors.
:param txt:
:returns:
:param txt: a string containing multiple contributor names
:returns: a list of names
"""
lines = [ln.strip() for ln in txt.split('\n')]
segments = [
Expand Down
6 changes: 3 additions & 3 deletions ckanext/attribution/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def can_edit():
"""
Check editing permissions for updating agent directly.
:returns:
:returns: True if user can edit agents, False if not
"""
try:
permitted = toolkit.check_access('agent_update', {}, {})
Expand All @@ -34,8 +34,8 @@ def get_contributions(pkg_id):
Template access for the
:func:`~ckanext.attribution.model.crud.PackageQuery.get_contributions` query method.
:param pkg_id:
:returns:
:param pkg_id: the ID of the package
:returns: list of activities associated with the package
"""
return PackageQuery.get_contributions(pkg_id)

Expand Down
14 changes: 7 additions & 7 deletions ckanext/attribution/logic/actions/meta/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
:type external_id: str
:param external_id_scheme: external scheme, e.g. orcid
:type external_id_scheme: str
:returns:
:returns: dict containing the ID if valid and any errors
"""

# SHOW =============================================================================================
Expand Down Expand Up @@ -281,8 +281,8 @@
:type start_date: datetime.date, optional
:param end_date: when the affiliation ended (e.g. when a researcher left an institution)
:type end_date: datetime.date, optional
:param context:
:param data_dict:
:param context: request context
:param data_dict: request data
:returns: The updated agent affiliation record.
:rtype: dict
"""
Expand All @@ -307,8 +307,8 @@
:type user_id: str, optional
:param name: name of an organisation [org only]
:type name: str, optional
:param context:
:param data_dict:
:param context: request context
:param data_dict: request data
:returns: The updated agent record.
:rtype: dict
"""
Expand Down Expand Up @@ -339,8 +339,8 @@
:type level: str, optional
:param time: time activity took place
:type time: datetime.datetime, optional
:param context:
:param data_dict:
:param context: request context
:param data_dict: request data
:returns: New contribution activity record.
:rtype: dict
"""
4 changes: 2 additions & 2 deletions ckanext/attribution/model/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def display_name(self):
@property
def standardised_name(self):
"""
Family name first for persons.
Name in a standardised format.
:returns:
:returns: full name (family name first) for person names, just name for other
"""
if self.agent_type == 'person':
return ', '.join([self.family_name, self.given_names])
Expand Down

0 comments on commit 751b4f6

Please sign in to comment.