Skip to content
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

Fix PLUGINS default config #92

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

walison17
Copy link
Collaborator

@walison17 walison17 commented Feb 8, 2024

fixed: #91
fixed: #87

@walison17 walison17 changed the title Fix PLUGINGS default config Fix PLUGINS default config Feb 8, 2024
src/settings.py Outdated
@@ -13,7 +13,7 @@
cast=lambda filename: tomllib.loads(Path(filename).read_text()),
default={},
)
PLUGINS = config("PLUGINS", cast=Csv(), default=[])
PLUGINS = config("PLUGINS", cast=Csv(), default=None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The csv parser will handle the default None and returns an empty list

see https://github.com/HBNetwork/python-decouple/blob/master/decouple.py#L277

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>>> from decouple import config, Csv 
>>> 
>>> 
>>> c = config("TEST", cast=Csv(), default=None)
>>> c
[]

@vmesel vmesel merged commit d938c8e into talkdai:main Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken PLUGINS default config plugin: error initial load
2 participants