Skip to content

Conversation

@Exirel
Copy link
Contributor

@Exirel Exirel commented Jan 18, 2022

Description

Tin: I fixed two warning/error:

  • Sphinx autodoc seems unable to properly manage typing.TypeVar, so I created a class declaration for the one used in plugins.rules,
  • A new method wasn't returning explicitly, and mypy doesn't like that so I fixed that as well, given it's in plugins.handlers

Two quick fixes.

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 Documentation Bugfix Generally, PRs that reference (and fix) one or more issue(s) labels Jan 18, 2022
@Exirel Exirel added this to the 8.0.0 milestone Jan 18, 2022
@Exirel Exirel requested a review from dgw January 18, 2022 23:17
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.

My usual stylistic touch… 😏

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.

Just let me know once squashed. I'm guessing you will because of the "fix" commit message. 😁

@dgw dgw mentioned this pull request Jan 18, 2022
4 tasks
It appears that Sphinx's autodoc plugin doesn't understand TypeVar
properly: it doesn't generate documentation, and it doesn't
understand it when used in a function's signature.

To fix that warning for now, a fake class declaration is written
in the documentation.

I added a TODO for when Sphinx fixes that problem.
@Exirel Exirel force-pushed the rules-fix-docs-mypy-warnings branch from 216c0c9 to 9144a0b Compare January 20, 2022 07:45
@Exirel
Copy link
Contributor Author

Exirel commented Jan 20, 2022

And done!

@dgw dgw merged commit d066191 into sopel-irc:master Jan 22, 2022
@Exirel Exirel deleted the rules-fix-docs-mypy-warnings branch February 23, 2022 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Generally, PRs that reference (and fix) one or more issue(s) Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants