Skip to content

Conversation

@Crozzers
Copy link
Contributor

This PR fixes #627, where if the extra options for middle-word-em was set to None it would raise a TypeError.

For extras, it's possible to initialise them without any options like so: extras={'abc': None}. This is usually handled in Extra.__init__ and converted to an empty dictionary, so that the extras don't have to worry about a bunch of runtime type checks:

self.options = options if options is not None else {}

However, middle-word-em would try to set some default options before calling super().__init__, and didn't have sufficient checks for if the value is None. This PR adds a check and converts it to a dict if so

@nicholasserra
Copy link
Collaborator

Thank you!

@nicholasserra nicholasserra merged commit 03d2391 into trentm:master Apr 14, 2025
15 checks passed
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.

How to set extras correctly

2 participants