Skip to content

Calls to config.get_option() made on file import may not pick up options set via CLI flag #2989

@vdonato

Description

@vdonato

One example of this happening can be found in folder_black_list.py, which on most streamlit commands gets imported before config options defined via CLI flag can be set in load_config_options.

To fix this, we'll want to

  1. Restructure the code that calls config.get_option on file import to do so in a more encapsulated way (there don't seem to be too many places that do this, thankfully)
  2. Stop initializing config options by calling get_config_options in get_option, set_option, etc, and instead assert that when these functions are called, config options have already been loaded.

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions