-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix some comments #1486
chore: fix some comments #1486
Conversation
Warning Rate limit exceeded@haouvw has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 13 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. WalkthroughThis update focuses on correcting various typographical errors across documentation and code comments without altering any functional aspects of the software. It aims to improve readability and maintainability by standardizing spelling in key terms related to setup guides, API specifications, and test scripts. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (3)
integration_tests/test_replay_block.py (1)
Line range hint
119-119
: Use direct comparison instead of Yoda conditions.Yoda conditions can reduce code readability. It's recommended to use direct comparisons for clarity.
- assert 2 == len(rsp["result"]) + assert len(rsp["result"]) == 2Also applies to: 138-138
Tools
Ruff
95-95: Do not
assert False
(python -O
removes these calls), raiseAssertionError()
(B011)Replace
assert False
integration_tests/test_basic.py (2)
Line range hint
48-48
: Optimize the use of string encoding.Directly use bytes literals for fixed strings instead of encoding them at runtime, which is more efficient.
- data = hashlib.sha256("gov".encode()).digest()[:20] + data = hashlib.sha256(b"gov").digest()[:20]
Line range hint
570-570
: Replace Yoda conditions with direct comparison for better readability.Direct comparisons are more readable and conventional in Python.
- assert 0 == contract.caller.query() + assert contract.caller.query() == 0 - assert 5 * (10**18) == contract.caller.query() + assert contract.caller.query() == 5 * (10**18) - assert 23828976 == receipt.cumulativeGasUsed + assert receipt.cumulativeGasUsed == 23828976 - assert 2000 == contract.caller.balanceOf(recipient) + assert contract.caller.balanceOf(recipient) == 2000 - assert "Hello" == contract.caller.greet() + assert contract.caller.greet() == "Hello" - assert "world" == greeter_call_result + assert greeter_call_result == "world"Also applies to: 576-576, 625-625, 685-685, 813-813, 822-822
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- docs/gravity-bridge/dev-setup-guide.md (1 hunks)
- docs/static/openapi.yml (2 hunks)
- integration_tests/cosmoscli.py (1 hunks)
- integration_tests/test_basic.py (2 hunks)
- integration_tests/test_replay_block.py (1 hunks)
Files skipped from review due to trivial changes (2)
- docs/static/openapi.yml
- integration_tests/cosmoscli.py
Additional context used
Ruff
integration_tests/test_replay_block.py
95-95: Do not
assert False
(python -O
removes these calls), raiseAssertionError()
(B011)Replace
assert False
119-119: Yoda conditions are discouraged, use
len(rsp["result"]) == 2
instead (SIM300)Replace Yoda condition with
len(rsp["result"]) == 2
138-138: Yoda conditions are discouraged, use
len(rsp["result"]) == 2
instead (SIM300)Replace Yoda condition with
len(rsp["result"]) == 2
integration_tests/test_basic.py
48-48: Unnecessary call to
encode
as UTF-8 (UP012)Rewrite as bytes literal
570-570: Yoda conditions are discouraged, use
contract.caller.query() == 0
instead (SIM300)Replace Yoda condition with
contract.caller.query() == 0
576-576: Yoda conditions are discouraged, use
contract.caller.query() == 5 * (10**18)
instead (SIM300)Replace Yoda condition with
contract.caller.query() == 5 * (10**18)
625-625: Yoda conditions are discouraged, use
receipt.cumulativeGasUsed == 23828976
instead (SIM300)Replace Yoda condition with
receipt.cumulativeGasUsed == 23828976
685-685: Yoda conditions are discouraged, use
contract.caller.balanceOf(recipient) == 2000
instead (SIM300)Replace Yoda condition with
contract.caller.balanceOf(recipient) == 2000
813-813: Yoda conditions are discouraged, use
contract.caller.greet() == "Hello"
instead (SIM300)Replace Yoda condition with
contract.caller.greet() == "Hello"
822-822: Yoda conditions are discouraged, use
greeter_call_result == "world"
instead (SIM300)Replace Yoda condition with
greeter_call_result == "world"
LanguageTool
docs/gravity-bridge/dev-setup-guide.md
[uncategorized] ~7-~7: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ... ## Prerequisite ### Binaries -geth
, the go-ethereum binary. -cronosd
, th...
[uncategorized] ~8-~8: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...th, the go-ethereum binary. -
cronosd, the cronos node binary. -
gorc`, the g...
[uncategorized] ~9-~9: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...onosd, the cronos node binary. -
gorc`, the gravity bridge orchestrator cli, bu...
[uncategorized] ~10-~10: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ronos/orchestrator/gorc). -pystarport
, a tool to run local cosmos devnet. - `s...
[grammar] ~26-~26: The verb form ‘embed’ does not seem to be suitable in this context. (HAVE_VB)
Context: ... use a public cronos testnet (that have embed the gravity-bridge module), or run `sta...
[grammar] ~168-~168: Make sure that the noun ‘setup’ is correct. Did you mean the past participle “set up”? (BE_VB_OR_NN)
Context: ...y bridge between ethereum and cronos is setup successfully.
Markdownlint
docs/gravity-bridge/dev-setup-guide.md
164-164: Column: 1 (MD010, no-hard-tabs)
Hard tabs
165-165: Column: 1 (MD010, no-hard-tabs)
Hard tabs
34-34: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
41-41: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
65-65: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
139-139: null (MD014, commands-show-output)
Dollar signs used before commands without showing output
37-37: Punctuation: ':' (MD026, no-trailing-punctuation)
Trailing punctuation in heading
66-66: Punctuation: ':' (MD026, no-trailing-punctuation)
Trailing punctuation in heading
79-79: Punctuation: ':' (MD026, no-trailing-punctuation)
Trailing punctuation in heading
73-73: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
88-88: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
92-92: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
102-102: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
73-73: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
88-88: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
hi, please sign the commit, thanks |
Signed-off-by: haouvw <[email protected]>
Thanks. Signed! |
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
fix some comments
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
Documentation
commission
field description in OpenAPI specification.Chores