Repository: jina-ai/jina
File: jina/hubble/helper.py (Python)

Code before:
    """
    env_variables = []
    with requirements_file.open() as requirements:
        for req in requirements:
            req = req.strip()
            if (not req) or req.startswith('#'):
                continue
            else:
                variables = get_env_variables(req)
                env_variables.extend(variables)

    return env_variables

def check_requirements_env_variable(env_variable: str) -> bool:
    """ 
    check the env variable is limited
    to uppercase letter and number and the `_` (underscore).
    :param env_variable: env_variable in the requirements.txt file
    :return: True or False if not satisfied
    """
    return check_env_variable(env_variable)

def replace_env_variables(requirements_file: 'Path') -> list:
    """get the env variables in requirements.txt
    :param requirements_file: the requirements.txt file
    :return: List of have replaced env variables in requirements.txt
    """
    env_variables = []
    with requirements_file.open('r') as requirements:
        for line in requirements.readlines():
            line = line.strip()
            if (not line) or line.startswith('#'):
                continue
            else:
                line = expand_env_variables(line)
                env_variables.append(line)
    return env_variables
    

def _get_install_options(requirements_file: 'Path', excludes: Tuple[str] = ('jina',)):
    with requirements_file.open() as requirements:
        install_options = []
        install_reqs = []
        for req in requirements:
            req = req.strip()
            if (not req) or req.startswith('#'):
                continue
            elif req.startswith('-'):
                for index, item in enumerate(req.split(' ')):
                    install_options.append(expand_env_variables(item))
            else:

Review comment (suggestion):
```suggestion
    :return: List of replaced env variables in requirements.txt
```

Code after:
    """
    env_variables = []
    with requirements_file.open() as requirements:
        for req in requirements:
            req = req.strip()
            if (not req) or req.startswith('#'):
                continue
            else:
                variables = get_env_variables(req)
                env_variables.extend(variables)

    return env_variables

def check_requirements_env_variable(env_variable: str) -> bool:
    """ 
    check the environment variables is limited
    to uppercase letter and number and the `_` (underscore).
    :param env_variable: env_variable in the requirements.txt file
    :return: True or False if not satisfied
    """
    return check_env_variable(env_variable)

def replace_requirements_env_variables(requirements_file: 'Path') -> list:
    """replace the environment variables in requirements.txt
    :param requirements_file: the requirements.txt file
    :return: List of replaced env variables in requirements.txt
    """
    env_variables = []
    with requirements_file.open('r') as requirements:
        for line in requirements.readlines():
            line = line.strip()
            if (not line) or line.startswith('#'):
                continue
            else:
                line = expand_env_variables(line)
                env_variables.append(line)
    return env_variables
    

def _get_install_options(requirements_file: 'Path', excludes: Tuple[str] = ('jina',)):
    with requirements_file.open() as requirements:
        install_options = []
        install_reqs = []
        for req in requirements:
            req = req.strip()
            if (not req) or req.startswith('#'):
                continue
            elif req.startswith('-'):
                for index, item in enumerate(req.split(' ')):
                    install_options.append(expand_env_variables(item))
            else: