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

Allow dataclasses in settings #3204

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Allow dataclasses in settings #3204

merged 1 commit into from
Oct 24, 2023

Conversation

FriedrichFroebel
Copy link
Contributor

This allows using dataclasses.dataclass inside the settings to allow clean access for more complex data structures (in my case: a list of images configured through an external file which are iterated over inside the theme). Previously, this would fail with a strange AttributeError. Some more background on this is available in mkdocs/mkdocs#3141 for example

Pull Request Checklist

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code
  • Updated documentation for changed code

Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

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

Thank you for the enhancement, Friedrich.

@justinmayer justinmayer merged commit 4caf9a8 into getpelican:master Oct 24, 2023
11 checks passed
@FriedrichFroebel FriedrichFroebel deleted the dataclass-in-settings branch November 16, 2023 20:14
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.

2 participants