Skip to content

Conversation

@Exirel
Copy link
Contributor

@Exirel Exirel commented Jan 4, 2023

Description

After upgrading mypy, I discovered two small problems to fix:

  • a missing Optional for an optional argument in sopel.bot
  • a simplification that was missed when cleaning imports in the ip built-in plugin

Note about the ip plugin: I didn't change the code or its formatting beside removing the unnecessary elif/else and removing one level of indentation. So if anything is wrong in this block of code, sorry I didn't check.

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 the Housekeeping Code cleanup, removal of deprecated stuff, etc. label Jan 4, 2023
@dgw dgw added this to the 8.0.0 milestone Jan 4, 2023
@Exirel Exirel requested a review from dgw January 4, 2023 23:01
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.

And this time I will wait for you to squash, unlike the last merge. 🙊

In a previous version, Sopel was not guarantee to have the retrieve
function, that may come from different imports based on the Python
version.

Now that everything is running with Python 3+, the function always
exists, so `elif retrieve:` was always true, becoming an irrelevant
condition.

`mypy` complained, rightfully so, about it.

Co-authored-by: dgw <[email protected]>
@Exirel Exirel force-pushed the mypy-type-fix-bot-and-ip branch from f141f28 to 7f07a95 Compare January 5, 2023 09:09
@Exirel
Copy link
Contributor Author

Exirel commented Jan 5, 2023

Done, ready to merge.

@dgw dgw merged commit 2bdf7cb into sopel-irc:master Jan 5, 2023
@Exirel Exirel deleted the mypy-type-fix-bot-and-ip branch April 8, 2023 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Housekeeping Code cleanup, removal of deprecated stuff, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants