File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11from test_import import print_a
22from test_import .test_import_1 import print_b
3+ from test_import .import_module_01 .test_import_4 import e
34
45print (print_a ())
56print (print_b ())
7+ print (e )
Original file line number Diff line number Diff line change @@ -3408,7 +3408,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
34083408 // Check for the nested modules with "."
34093409 // Example: from x.y import z
34103410 if (mod_sym.find (" ." ) != std::string::npos) {
3411- mod_sym. replace (mod_sym. find ( " . " ), 1 , " /" );
3411+ mod_sym = replace (mod_sym, " [.] " , " /" );
34123412 if (is_directory (paths[0 ] + " /" + mod_sym)) {
34133413 // Directory i.e., x/y/__init__.py
34143414 paths[0 ] += ' /' + mod_sym;
@@ -3429,7 +3429,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
34293429 } else if (mod_sym.find (" ." ) != std::string::npos) {
34303430 // Check for the nested modules with "."
34313431 // Example: from x.y import z
3432- mod_sym. replace (mod_sym. find ( " . " ), 1 , " /" );
3432+ mod_sym = replace (mod_sym, " [.] " , " /" );
34333433 if (is_directory (paths[1 ] + " /" + mod_sym)) {
34343434 if (parent_dir != " " ) paths[1 ] += " /" ;
34353435 paths[1 ] += mod_sym;
You can’t perform that action at this time.
0 commit comments