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

config: warn if unexpected settings exist #1973

Merged
merged 2 commits into from
Dec 25, 2020

Conversation

Exirel
Copy link
Contributor

@Exirel Exirel commented Oct 30, 2020

Description

Fix #1570

To implement this, I added new methods and changed the bot's setup() method:

  • sopel.config.Config.get_defined_sections() retrieves all defined sections, so it's easier to know which sections of the config file are defined in order to check them for unexpected settings
  • sopel.bot.Sopel.setup() now calls a new method called post_setup(), to start the scheduler and perform post-setup checks

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@Exirel Exirel added this to the 7.1.0 milestone Oct 30, 2020
@Exirel Exirel requested a review from a team October 30, 2020 14:39
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

This looks pretty straightforward. 🚀 My suggested changes are all in documentation.

sopel/config/__init__.py Outdated Show resolved Hide resolved
sopel/config/__init__.py Outdated Show resolved Hide resolved
sopel/config/__init__.py Outdated Show resolved Hide resolved
@dgw
Copy link
Member

dgw commented Oct 30, 2020

@Exirel Go ahead and squash, then we'll let the final history finish checks before I approve it… at the rate Travis is running jobs, maybe tomorrow. 😝

@Exirel Exirel force-pushed the config-unexpected-settings branch from 21886c7 to 35e4916 Compare October 30, 2020 15:51
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

🥳

@dgw dgw merged commit 2439128 into sopel-irc:master Dec 25, 2020
@Exirel Exirel deleted the config-unexpected-settings branch May 1, 2021 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

config: Warn if unexpected settings exist
2 participants