-
Notifications
You must be signed in to change notification settings - Fork 6
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
simplify routing #22
simplify routing #22
Conversation
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.
Hey @joamatab - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Docstrings: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
_settings_sc = dict( | ||
straight="straight_sc", cross_section=xs_sc, bend="bend_sc", taper="taper_sc" | ||
) | ||
_settings_so = dict( | ||
straight="straight_so", cross_section=xs_so, bend="bend_so", taper="taper_so" | ||
) | ||
_settings_rc = dict( | ||
straight="straight_rc", cross_section=xs_rc, bend="bend_rc", taper="taper_rc" | ||
) | ||
_settings_ro = dict( | ||
straight="straight_ro", cross_section=xs_ro, bend="bend_ro", taper="taper_ro" | ||
) | ||
_settings_nc = dict( | ||
straight="straight_nc", cross_section=xs_nc, bend="bend_nc", taper="taper_nc" | ||
) | ||
_settings_no = dict( |
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.
suggestion (code_refinement): Consider using a loop or a more dynamic structure for settings initialization.
The repetitive structure for initializing settings for different routing configurations could be simplified using a loop or a dictionary comprehension, enhancing maintainability and reducing code duplication.
_settings_sc = dict( | |
straight="straight_sc", cross_section=xs_sc, bend="bend_sc", taper="taper_sc" | |
) | |
_settings_so = dict( | |
straight="straight_so", cross_section=xs_so, bend="bend_so", taper="taper_so" | |
) | |
_settings_rc = dict( | |
straight="straight_rc", cross_section=xs_rc, bend="bend_rc", taper="taper_rc" | |
) | |
_settings_ro = dict( | |
straight="straight_ro", cross_section=xs_ro, bend="bend_ro", taper="taper_ro" | |
) | |
_settings_nc = dict( | |
straight="straight_nc", cross_section=xs_nc, bend="bend_nc", taper="taper_nc" | |
) | |
_settings_no = dict( | |
settings_prefixes = ["sc", "so", "rc", "ro", "nc", "no"] | |
settings = { | |
f"settings_{suffix}": { | |
"straight": f"straight_{suffix}", | |
"cross_section": f"xs_{suffix}", | |
"bend": f"bend_{suffix}", | |
"taper": f"taper_{suffix}" | |
} for suffix in settings_prefixes | |
} |
cspdk.cells
@flaport