Skip to content

Commit

Permalink
Revert "Extract local variable refactoring."
Browse files Browse the repository at this point in the history
This reverts commit e042ce0.
  • Loading branch information
khatchad committed Apr 8, 2024
1 parent a23b4ad commit d35b1dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,17 @@ public CAstNode visitImportFrom(ImportFrom importFrom) throws Exception {

LOGGER.finer("Module name from " + importFrom + " is: " + moduleName + ".");

if (localModule) {
if (isLocalModule(moduleName)) {
List<File> pythonPath = PythonModuleParser.this.getPythonPath();

// If there is a PYTHONPATH specified.
if (pythonPath != null && !pythonPath.isEmpty()) {
// Adjust the module name per the PYTHONPATH.
Optional<SourceModule> module = getLocalModule(moduleName);
Optional<SourceModule> localModule = getLocalModule(moduleName);

for (File pathEntry : pythonPath) {
Path modulePath =
module
localModule
.map(SourceModule::getURL)
.map(URL::getFile)
.map(Path::of)
Expand Down

0 comments on commit d35b1dc

Please sign in to comment.