'How can I hide a "utils" inside a submodule in python (vscode)?

I have the following package structure:

package/:
    mymodule.py
    submodule/
        __init__.py
        utils.py

Contents of utils.py:

def double(arr):
    return arr * 2

Contents of __init__.py:

from utils import double

Now, in VSCode (don't know if it is a feature of vscode), how can I hide (or even make unavailable) the script "utils.py" from submodule? So that this doesn't happen (utils appearing):

enter image description here

I wanted to be able to just get access (or view) of the double function.



Solution 1:[1]

The easiest and most efficient way is to set "editor.suggest.showModules": false Add this setting to your settings.json file.

For more VS Code intellisense settings you can check this link

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JialeDu