Skip to content

Added missing import #2167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Added missing import #2167

wants to merge 1 commit into from

Conversation

einjun03
Copy link

@einjun03 einjun03 commented Apr 1, 2025

Motivation and Context

The habitat/config/__init__.py file currently lists default_structured_configs in its __all__ but doesn't import it. This is incorrect because:

  1. It promises to export a name that isn't actually available in the module
  2. It could cause errors when users try to use from habitat.config import *
  3. It's inconsistent with the actual module exports

This fix ensures that the module's exports match its declarations in __all__.

How Has This Been Tested

The fix has been tested by:

  1. Verifying that from habitat.config import * works without errors
  2. Confirming that default_structured_configs is properly imported and available
  3. Checking that existing imports of default_structured_configs from other files continue to work

Types of changes

  • [Bug Fix] (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation if required.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes if required.

Code Changes

# habitat/config/__init__.py
from habitat.config.default import DictConfig, get_config
from habitat.config.read_write import read_write
from habitat.config.default_structured_configs import *  # Added missing import

__all__ = ["get_config", "read_write", "default_structured_configs"]

@facebook-github-bot
Copy link
Contributor

Hi @einjun03!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants