Use [] and {} instead of list() and dict()#8748
Use [] and {} instead of list() and dict()#8748benediktjohannes wants to merge 1 commit intoProject-MONAI:devfrom
Conversation
Signed-off-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughModified Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai do you agree with these changes? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 792 🏁 Script executed: Length of output: 551 🏁 Script executed: Length of output: 0
The changes are functionally equivalent and safe in this context (default arguments to |
|
Wow! I am amazed how cool this tool is, I thought that this would definitely not work, just to chat here with the AI, very nice and helpful for workflows! Appreciate it! 👍 |
…r.py (#8749) ### Description See also #8747 and #8748 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com> Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
|
Hi @benediktjohannes I commented in another PR about replacing names like this with literal syntax. I suppose this saves a name lookup but I wonder if the interpreter doesn't replace these things automatically anyway. Do you actually see any speedup here? There's probably many other places in MONAI that should have this done as well. |
Description
See also #8747
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.