Skip to content

Added missing import - #2167

Open
ejnj03 wants to merge 1 commit into
facebookresearch:mainfrom
ejnj03:main
Open

Added missing import#2167
ejnj03 wants to merge 1 commit into
facebookresearch:mainfrom
ejnj03:main

Conversation

@ejnj03

@ejnj03 ejnj03 commented Apr 1, 2025

Copy link
Copy Markdown

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
Copy Markdown
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 cla@meta.com. 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