Skip to content

Allow dataclasses in settings - #3204

Merged
justinmayer merged 1 commit into
getpelican:masterfrom
FriedrichFroebel:dataclass-in-settings
Oct 24, 2023
Merged

justinmayer merged 1 commit into
getpelican:masterfrom
FriedrichFroebel:dataclass-in-settings

Conversation

@FriedrichFroebel

Copy link
Copy Markdown
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

@justinmayer justinmayer left a comment

Copy link
Copy Markdown
Member

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
@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