File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
from test_import import print_a
2
2
from test_import .test_import_1 import print_b
3
+ from test_import .import_module_01 .test_import_4 import e
3
4
4
5
print (print_a ())
5
6
print (print_b ())
7
+ print (e )
Original file line number Diff line number Diff line change @@ -3408,7 +3408,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
3408
3408
// Check for the nested modules with "."
3409
3409
// Example: from x.y import z
3410
3410
if (mod_sym.find (" ." ) != std::string::npos) {
3411
- mod_sym. replace (mod_sym. find ( " . " ), 1 , " /" );
3411
+ mod_sym = replace (mod_sym, " [.] " , " /" );
3412
3412
if (is_directory (paths[0 ] + " /" + mod_sym)) {
3413
3413
// Directory i.e., x/y/__init__.py
3414
3414
paths[0 ] += ' /' + mod_sym;
@@ -3429,7 +3429,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
3429
3429
} else if (mod_sym.find (" ." ) != std::string::npos) {
3430
3430
// Check for the nested modules with "."
3431
3431
// Example: from x.y import z
3432
- mod_sym. replace (mod_sym. find ( " . " ), 1 , " /" );
3432
+ mod_sym = replace (mod_sym, " [.] " , " /" );
3433
3433
if (is_directory (paths[1 ] + " /" + mod_sym)) {
3434
3434
if (parent_dir != " " ) paths[1 ] += " /" ;
3435
3435
paths[1 ] += mod_sym;
You can’t perform that action at this time.
0 commit comments