You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a question earlier today on IRC about how to access the bot config (bot.settings.sectionname vs config.sectionname), I took a brief look at some of our documentation about using settings.
First off, it's important to note that many builtins still reference bot.config—meaning anyone using the builtins as reference (which is part of what they're there for) will copy-paste the "old" style. Things should be updated to use bot.settings, and ultimately we could use a proper lifecycle plan for the bot.config attribute. It's "TODO" deprecated, not actually deprecated; we should perhaps have bot.settings also be a property, and store the actual Config in a sunder attr. (config is already a property, so in theory it would be easy to slap a @sopel.lifecycle.deprecated() decorator on it.)
More importantly, any places in the docs or website that refer to bot.config should be updated.
And finally, the sopel.config.types page has a very unclear example right at the top, the source of our IRC visitor's confusion: it shows just using config on its own.
It's not immediately clear to a reader that this is about working with the config types outside the context of a bot. As we work on 8.1 we should keep an eye out for cases like this to clarify them and/or link to the relevant place in the Developer Overview section—here, the "Configuration and plugin setup" tutorial.
The text was updated successfully, but these errors were encountered:
After a question earlier today on IRC about how to access the bot config (
bot.settings.sectionname
vsconfig.sectionname
), I took a brief look at some of our documentation about using settings.First off, it's important to note that many
builtins
still referencebot.config
—meaning anyone using the builtins as reference (which is part of what they're there for) will copy-paste the "old" style. Things should be updated to usebot.settings
, and ultimately we could use a proper lifecycle plan for thebot.config
attribute. It's "TODO" deprecated, not actually deprecated; we should perhaps havebot.settings
also be a property, and store the actualConfig
in a sunder attr. (config
is already a property, so in theory it would be easy to slap a@sopel.lifecycle.deprecated()
decorator on it.)More importantly, any places in the docs or website that refer to
bot.config
should be updated.And finally, the
sopel.config.types
page has a very unclear example right at the top, the source of our IRC visitor's confusion: it shows just usingconfig
on its own.It's not immediately clear to a reader that this is about working with the config types outside the context of a
bot
. As we work on 8.1 we should keep an eye out for cases like this to clarify them and/or link to the relevant place in the Developer Overview section—here, the "Configuration and plugin setup" tutorial.The text was updated successfully, but these errors were encountered: