Skip to content

Conversation

@Exirel
Copy link
Contributor

@Exirel Exirel commented Dec 7, 2021

Description

One PR, two issues:

  • LGTM issues that are better fixed than ignored
  • Type hint warning for documentation
  • Update documentation to replace the mixin by the abstract named rule class
  • Fix a deprecated usage of an abstract method decorator in Rule

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 Low Priority Housekeeping Code cleanup, removal of deprecated stuff, etc. labels Dec 7, 2021
@Exirel Exirel added this to the 8.0.0 milestone Dec 7, 2021
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.

Below is more of an idea. The "request changes" review status is about what I said in the line notes.

Surely there's a way to deal with this that doesn't require removing the mixin pattern? Off the top of my head, adding an AnonymousRuleMixin that provides get_rule_label() for Rule, leaving NamedRuleMixin to provide it for the command-type rules.

@dgw
Copy link
Member

dgw commented Dec 15, 2021

Was troubleshooting for some other doc-related thing I'm trying to fix, and was checking to see if this patch affected that issue at all. It doesn't, but test-building the docs on this branch showed me that it breaks some of docs/source/plugin/internals.rst due to the reference left behind to a NamedRuleMixin class that no longer exists after this change.

@Exirel Exirel mentioned this pull request Dec 16, 2021
4 tasks
@Exirel
Copy link
Contributor Author

Exirel commented Dec 16, 2021

I stole the type-hint fix from #2223 and also the classmethod/abstractclassmethod warning since I'm touching the same files/area.

@dgw
Copy link
Member

dgw commented Dec 17, 2021

I stole the type-hint fix from #2223 and also the classmethod/abstractclassmethod warning since I'm touching the same files/area.

I wouldn't do that just because you're touching the same stuff. Let this PR be about fixing the code, and #2223 can be about making the docs better.

@Exirel
Copy link
Contributor Author

Exirel commented Dec 17, 2021

My main issue is that I need to check if the doc properly build, which it doesn't, and specifically on the classes I touch/modify. So maybe I just need #2223 to be merged before I can move forward.

As for the stolen part, don't worry: I did forgot the co-author tag, and that's my fault, I was a bit caught up into too many PRs at once, and I should have been more careful.

@Exirel Exirel force-pushed the plugins-rules-lgtm-conflicts branch from 942a368 to 4f6819e Compare December 21, 2021 16:56
dgw
dgw previously approved these changes Dec 21, 2021
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.

Yeah, I'm just dropping this line note for posterity, not because I want something to change as a result. Let's say this is ready.

@dgw
Copy link
Member

dgw commented Dec 24, 2021

My main issue is that I need to check if the doc properly build, which it doesn't, and specifically on the classes I touch/modify. So maybe I just need #2223 to be merged before I can move forward.

I spent a bit of time on that today and will shortly post a follow-up there with some things I noticed. But the bottom line for this patch is going to be that I no longer think it's a good idea to mess with Sphinx in this PR. Let's get the code changes from this in, only, and then I'll resume work on #2223 to check for any other warnings/issues in the docs.

@dgw dgw dismissed their stale review December 24, 2021 16:25

Part of this patch no longer seems wise; see comments.

@Exirel
Copy link
Contributor Author

Exirel commented Dec 26, 2021

I no longer think it's a good idea to mess with Sphinx in this PR

I kept the strict minimum that makes sense in this PR regarding the documentation: I replaced the autodoc for the mixin by the autodoc for the abstract class. I feel like it's a fair change of the documentation while not messing with Sphinx, i.e. not trying to fix too much.

@Exirel Exirel requested a review from dgw December 26, 2021 01:09
@dgw
Copy link
Member

dgw commented Dec 26, 2021

Ack, thanks Exirel. I'll approve and merge once squashed.

@Exirel Exirel force-pushed the plugins-rules-lgtm-conflicts branch from ea56c9b to 77ff78a Compare December 26, 2021 21:48
@Exirel
Copy link
Contributor Author

Exirel commented Dec 26, 2021

And done.

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.

Remaining changes look sane, plus I know we have oodles of tests for this part of the code. 😏

@dgw dgw merged commit 6305e40 into sopel-irc:master Dec 27, 2021
@Exirel Exirel deleted the plugins-rules-lgtm-conflicts branch January 20, 2022 07:34
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. Low Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants