-
Notifications
You must be signed in to change notification settings - Fork 271
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
Print position parameter as 'pos' #1134
Conversation
WalkthroughThe Changes
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 Configration 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: 1
Outside diff range and nitpick comments (4)
vedo/plotter.py (4)
Line range hint
3419-3419
: Avoid using bareexcept
.- except: + except Exception as e: + vedo.logger.error("Error encountered: " + str(e))
Line range hint
3669-3669
: Avoid using bareexcept
.- except: + except Exception as e: + vedo.logger.error("Error encountered: " + str(e))
Line range hint
4399-4399
: Avoid using bareexcept
.- except: + except Exception as e: + vedo.logger.error("Error encountered: " + str(e))
Line range hint
4444-4444
: Avoid using bareexcept
.- except: + except Exception as e: + vedo.logger.error("Error encountered: " + str(e))
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- vedo/plotter.py (1 hunks)
Additional context used
Ruff
vedo/plotter.py
559-559: Ambiguous variable name:
l
(E741)
3419-3419: Do not use bare
except
(E722)
3669-3669: Do not use bare
except
(E722)
4399-4399: Do not use bare
except
(E722)
4444-4444: Do not use bare
except
(E722)
@@ -4125,7 +4125,7 @@ def _default_keypress(self, iren, event) -> None: | |||
vedo.printc("\n###################################################", c="y") | |||
vedo.printc("## Template python code to position this camera: ##", c="y") | |||
vedo.printc("cam = dict(", c="y") | |||
vedo.printc(" position=" + utils.precision(cam.GetPosition(), 6) + ",", c="y") | |||
vedo.printc(" pos=" + utils.precision(cam.GetPosition(), 6) + ",", c="y") |
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.
Update camera position print format to ensure high precision.
- vedo.printc(" pos=" + utils.precision(cam.GetPosition(), 6) + ",", c="y")
+ vedo.printc(" pos=" + utils.precision(cam.GetPosition(), 7) + ",", c="y")
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
vedo.printc(" pos=" + utils.precision(cam.GetPosition(), 6) + ",", c="y") | |
vedo.printc(" pos=" + utils.precision(cam.GetPosition(), 7) + ",", c="y") |
Hi @marcomusy. I noticed that when printing the camera position, it returns
position
when the docs state it should bepos
.This PR changes this from
position
topos
to match the docs and helps us stay consistent in brainrender.I think this is a simple change, but let me know if I've missed anything.