Fix bugs in interface_generator and reorder imports in hetero_searching#46
Merged
tmizoguchim merged 1 commit intonmdl-mizo:developfrom Apr 14, 2026
Merged
Conversation
- interface_generator l1670: remove block comments - interface_generator l2459: fix __init__ missing colon and instance variable assignments - interface_generator l2469: add self parameter to csl_cnid_calc and find_c - hetero_searchnig: reorder imports to prevent numpy.core overwriting interfacemaster.interface_generator.core
There was a problem hiding this comment.
Pull request overview
This PR addresses Python syntax/import issues that were preventing interfacemaster modules from being imported/executed correctly, primarily by fixing broken code in interface_generator.py and adjusting import ordering in hetero_searching.py.
Changes:
- Removes problematic empty quote blocks and attempts to repair a broken commented-out section in
search_one_position_2D. - Fixes
hetero_generator.__init__syntax and stores constructor inputs onself; updates method signatures to includeself. - Reorders
numpyimports inhetero_searching.pyto avoid name collisions withcore.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| interfacemaster/interface_generator.py | Fixes syntax issues in a class constructor and method definitions; adjusts a previously broken commented-out block near search_one_position_2D. |
| interfacemaster/hetero_searching.py | Moves numpy wildcard imports earlier to prevent overwriting core imported from interface_generator. |
Comments suppressed due to low confidence (1)
interfacemaster/interface_generator.py:1675
- The commented-out
#def specified_matching(...)line is at class indentation, but the following triple-quoted block is still indented, which makes it a standalone indented string at class scope and will raise anIndentationError/SyntaxError. Either fully remove this dead block, or comment out the docstring lines too, or restore a realdef specified_matching(...)with correct indentation so the docstring is inside a function body.
#def specified_matching(hkl_substrate, hkl_film, B_substrate, B_film):
"""
lattice matching by specified indices
Parameters
----------
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Thanks for the fixes. I checked the changes, and the syntax/import issues look resolved. Merging this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix syntax errors and import order bugs.
Changes