Skip to content

Conversation

@cheese-cakee
Copy link
Contributor

@cheese-cakee cheese-cakee commented Jan 7, 2026

Summary

  • Added comprehensive docstring to TokenType enum explaining fungible vs non-fungible tokens
  • Provides clear use cases and examples for each token type
  • Improves developer experience by helping choose the correct token type for their use case

References

Fixes #1392

- Add comprehensive docstring explaining inclusive vs exclusive fee assessment
- Clarify when each method should be used and their payment implications
- Update changelog entry

Fixes #1391

Signed-off-by: cheese-cakee <[email protected]>
- Add comprehensive docstring explaining fungible vs non-fungible tokens
- Provide use cases and examples for each token type
- Update changelog entry

Fixes #1392

Signed-off-by: cheese-cakee <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Warning

Rate limit exceeded

@cheese-cakee has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 72b1af3 and c2365e7.

📒 Files selected for processing (1)
  • src/hiero_sdk_python/tokens/token_type.py
📝 Walkthrough

Walkthrough

The TokenType enum class documentation was expanded with a comprehensive docstring explaining fungible versus non-fungible token types, use cases, and implementation details. A corresponding changelog entry was added to document this documentation enhancement.

Changes

Cohort / File(s) Summary
Documentation Updates
src/hiero_sdk_python/tokens/token_type.py
Expanded TokenType enum class docstring from brief one-liner to detailed multi-line documentation covering fungible/non-fungible semantics, examples, and use case guidance
Changelog
CHANGELOG.md
Added entry documenting the comprehensive docstring addition to TokenType enum

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: enhance TokenType enum docstring' directly and clearly describes the main change in the pull request.
Description check ✅ Passed The description is related to the changeset, explaining that a comprehensive docstring was added to the TokenType enum with use cases and examples.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #1392: comprehensive docstring added to TokenType enum explaining fungible vs non-fungible tokens with use cases and examples.
Out of Scope Changes check ✅ Passed All changes are in scope: TokenType enum docstring enhancement and corresponding CHANGELOG.md entry align with issue #1392 objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89afede and 72b1af3.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/hiero_sdk_python/tokens/token_type.py
🧰 Additional context used
🪛 Ruff (0.14.10)
src/hiero_sdk_python/tokens/token_type.py

15-15: Docstring contains ambiguous (EN DASH). Did you mean - (HYPHEN-MINUS)?

(RUF002)


19-19: Docstring contains ambiguous (EN DASH). Did you mean - (HYPHEN-MINUS)?

(RUF002)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
CHANGELOG.md (1)

10-10: Changelog entry is clear and appropriately placed.

The entry accurately describes the documentation enhancement and includes the linked issue reference. Formatting is consistent with surrounding entries.

Fix RUF002 linting error by replacing – with - in docstring
to comply with code style guidelines.

Signed-off-by: cheese-cakee <[email protected]>
Fix RUF002 linting error by replacing – with - in docstring
to comply with code style guidelines.

Signed-off-by: cheese-cakee <[email protected]>
"""
Token type for Hedera tokens:
• FUNGIBLE_COMMON - Interchangeable tokens where each unit is equal.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation for both must match please

unique assets. Each token has its own metadata and
identity.
This enum determines whether a token represents a divisible, interchangeable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly,the explanation goes near the top

"""
Token type for Hedera tokens:
• FUNGIBLE_COMMON - Interchangeable tokens where each unit is equal.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are grouped under attributes please

@exploreriii exploreriii marked this pull request as draft January 8, 2026 09:12
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Hi, this is MergeConflictBot.
Your pull request cannot be merged because it contains merge conflicts.

Please resolve these conflicts locally and push the changes.

To assist you, please read:

Thank you for contributing!

…ples

- Add comprehensive Google-style docstring with Attributes, Examples, Args, Returns sections
- Include practical example usage for better developer understanding
- Maintain existing functionality while improving documentation quality

Addresses maintainer feedback for better docstring format

Signed-off-by: cheese-cakee <[email protected]>
- Add comprehensive Google-style docstring with Attributes, Examples, Args, Returns sections
- Include practical example usage for better developer understanding
- Maintain existing functionality while improving documentation quality

Addresses maintainer feedback for better docstring format

Signed-off-by: cheese-cakee <[email protected]>
- Both PRs are up to date with latest changes
- No actual merge conflicts detected
- Documentation improvements implemented as requested by maintainer
…ocstring improvements

- Add changelog entries for PR #1393 and #1394
- Document enhanced docstrings with Google-style format and examples
- Reflects proper contributor acknowledgments

Prepares changelog for proper documentation of recent enhancements

Signed-off-by: cheese-cakee <[email protected]>
- Force GitHub to update PR status with latest changes
>>> print(f"Token type: {token_type}")
Token type: TokenType.FUNGIBLE_COMMON
Args:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use args and returns a lot in our docstrings, they are great
However, in this case we do not need them - they are only needed for functions, as these are the ones that pass arguments and returns
For token type which is a class, we do not have return types or args, so can delete this section

- Add comprehensive docstring explaining fungible vs non-fungible tokens
- Provide use cases and examples for each token type
- Update changelog entry

Fixes #1392

Signed-off-by: cheese-cakee <[email protected]>
Fix RUF002 linting error by replacing – with - in docstring
to comply with code style guidelines.

Signed-off-by: cheese-cakee <[email protected]>
- Add comprehensive Google-style docstring with Attributes, Examples, Args, Returns sections
- Include practical example usage for better developer understanding
- Maintain existing functionality while improving documentation quality

Addresses maintainer feedback for better docstring format

Signed-off-by: cheese-cakee <[email protected]>
- Both PRs are up to date with latest changes
- No actual merge conflicts detected
- Documentation improvements implemented as requested by maintainer
- Removed Args/Returns sections from enum classes as they don't accept parameters
- Fixed indentation to follow Google-style docstring format
- Maintained comprehensive Examples and Attributes sections
@exploreriii
Copy link
Contributor

Hi @cheese-cakee
Your branch is super corrupted now
This was a branch for token type, and notice you have commits about fee schedule there too
Somewhere along the way you absorbed content from another branch

I would recommend starting a fresh branch
I'm happy if you submit one PR to solve both issues, if that's easier
But note you'll probably need to update your fork
Screenshot 2026-01-08 at 12 48 41

git checkout main
git fetch upstream
git pull upstream main
git push origin

Lastly, create a branch:

git checkout -b my-new-branch-name

@exploreriii exploreriii closed this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Good First Issue]: Add comprehensive docstring to TokenType enum in src/hiero_sdk_python/tokens/token_type.py

2 participants