Skip to content

Commit d8f65c2

Browse files
committed
docs: update parameter descriptions in License and PILFlavor classes for improved clarity and consistency
1 parent 4767da7 commit d8f65c2

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

src/story_protocol_python_sdk/resources/License.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def _register_license_terms_helper(
231231
"""
232232
Validate the license terms.
233233
234-
:param license_terms LicenseTermsInput: The license terms.
234+
:param license_terms `LicenseTermsInput`: The license terms.
235235
:param tx_options dict: [Optional] The transaction options.
236236
:return dict: A dictionary with the transaction hash and the license terms ID.
237237
"""

src/story_protocol_python_sdk/types/resource/License.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LicenseTermsOverride:
2121
commercial_attribution: Whether commercial attribution is required.
2222
commercializer_checker: The address of the commercializer checker contract.
2323
commercializer_checker_data: The data to be passed to the commercializer checker contract.
24-
commercial_rev_share: Percentage of revenue that must be shared with the licensor.
24+
commercial_rev_share: Percentage of revenue that must be shared with the licensor. Must be between 0 and 100 (where 100% represents 100_000_000).
2525
commercial_rev_ceiling: The maximum revenue that can be collected from commercial use.
2626
derivatives_allowed: Whether derivatives are allowed.
2727
derivatives_attribution: Whether attribution is required for derivatives.

src/story_protocol_python_sdk/utils/pil_flavor.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def non_commercial_social_remixing(
134134
135135
See: https://docs.story.foundation/concepts/programmable-ip-license/pil-flavors#non-commercial-social-remixing
136136
137-
:param override: Optional overrides for the default license terms.
138-
:return: The license terms dictionary.
137+
:param `override` `Optional[LicenseTermsOverride]`: Optional overrides for the default license terms.
138+
:return: `LicenseTermsInput`: The license terms.
139139
"""
140140
terms = _apply_override(PILFlavor._non_commercial_social_remixing_pil, override)
141141
return PILFlavor.validate_license_terms(terms)
@@ -152,11 +152,11 @@ def commercial_use(
152152
153153
See: https://docs.story.foundation/concepts/programmable-ip-license/pil-flavors#commercial-use
154154
155-
:param default_minting_fee: The fee to be paid when minting a license.
156-
:param currency: The ERC20 token to be used to pay the minting fee.
157-
:param royalty_policy: The type of royalty policy to be used. Default is LAP.
158-
:param override: Optional overrides for the default license terms.
159-
:return: The license terms dictionary.
155+
:param `default_minting_fee` int: The fee to be paid when minting a license.
156+
:param `currency` Address: The ERC20 token to be used to pay the minting fee.
157+
:param `royalty_policy` `Optional[RoyaltyPolicyInput]`: The type of royalty policy to be used.(default: LAP)
158+
:param `override` `Optional[LicenseTermsOverride]`: Optional overrides for the default license terms.
159+
:return: `LicenseTermsInput`: The license terms.
160160
"""
161161
base = replace(
162162
PILFlavor._commercial_use,
@@ -180,12 +180,12 @@ def commercial_remix(
180180
181181
See: https://docs.story.foundation/concepts/programmable-ip-license/pil-flavors#commercial-remix
182182
183-
:param default_minting_fee: The fee to be paid when minting a license.
184-
:param currency: The ERC20 token to be used to pay the minting fee.
185-
:param commercial_rev_share: Percentage of revenue that must be shared with the licensor. Must be between 0 and 100.
186-
:param royalty_policy: The type of royalty policy to be used. Default is LAP.
187-
:param override: Optional overrides for the default license terms.
188-
:return: The license terms dictionary.
183+
:param `default_minting_fee` int: The fee to be paid when minting a license.
184+
:param `currency` Address: The ERC20 token to be used to pay the minting fee.
185+
:param `commercial_rev_share` int: Percentage of revenue that must be shared with the licensor. Must be between 0 and 100.
186+
:param `royalty_policy` `Optional[RoyaltyPolicyInput]`: The type of royalty policy to be used.(default: LAP)
187+
:param `override` `Optional[LicenseTermsOverride]`: Optional overrides for the default license terms.
188+
:return: `LicenseTermsInput`: The license terms.
189189
"""
190190
base = replace(
191191
PILFlavor._commercial_remix,
@@ -208,10 +208,10 @@ def creative_commons_attribution(
208208
209209
See: https://docs.story.foundation/concepts/programmable-ip-license/pil-flavors#creative-commons-attribution
210210
211-
:param currency: The ERC20 token to be used to pay the minting fee.
212-
:param royalty_policy: The type of royalty policy to be used. Default is LAP.
213-
:param override: Optional overrides for the default license terms.
214-
:return: The license terms dictionary.
211+
:param `currency` Address: The ERC20 token to be used to pay the minting fee.
212+
:param `royalty_policy` `Optional[RoyaltyPolicyInput]`: The type of royalty policy to be used.(default: LAP)
213+
:param `override` `Optional[LicenseTermsOverride]`: Optional overrides for the default license terms.
214+
:return: `LicenseTermsInput`: The license terms.
215215
"""
216216
base = replace(
217217
PILFlavor._creative_commons_attribution,
@@ -226,8 +226,8 @@ def validate_license_terms(params: LicenseTermsInput) -> LicenseTermsInput:
226226
"""
227227
Validates and normalizes license terms.
228228
229-
:param params: The license terms parameters to validate.
230-
:return: The validated and normalized license terms.
229+
:param params `LicenseTermsInput`: The license terms parameters to validate.
230+
:return: `LicenseTermsInput`: The validated and normalized license terms.
231231
:raises PILFlavorError: If validation fails.
232232
"""
233233
# Normalize royalty_policy to address

tests/integration/test_integration_license.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def test_set_licensing_config(
336336
minting_fee=100,
337337
is_set=True,
338338
licensing_hook=ZERO_ADDRESS,
339-
hook_data=b"",
339+
hook_data="test",
340340
commercial_rev_share=100,
341341
disabled=False,
342342
expect_minimum_group_reward_share=10,
@@ -361,7 +361,7 @@ def test_get_licensing_config(
361361
is_set=True,
362362
minting_fee=100,
363363
licensing_hook=ZERO_ADDRESS,
364-
hook_data=b"",
364+
hook_data=b"test",
365365
disabled=False,
366366
expect_minimum_group_reward_share=10 * 10**6,
367367
expect_group_reward_pool=ZERO_ADDRESS,

0 commit comments

Comments
 (0)