Skip to content

Conversation

@dgw
Copy link
Member

@dgw dgw commented Nov 19, 2022

Description

Was working on something in sopel-github and got annoyed that I had to check git blame to verify that the functions I wanted to use would be available in that plugin's minimum required Sopel version.

willie.tools.time came into existence in the 5.3 release, so I used that as the module's versionadded, and treated the namespace change from willie to sopel as a versionchanged event.

If people are nice to me (read: this gets reviewed in something less than a month 😝), I might go through the rest of sopel.tools and add any missing version annotations in its other submodules, too. This is the sort of thing I'm always on the lookout for when working on other stuff, because if the documentation annoys me (who's been around the project for almost a decade), it will almost certainly annoy noobs.

Relevant preview link

I touched only sopel/tools/time.py, so of the whole preview deploy available from Netlify, only https://deploy-preview-2379--sopel-unstable-docs.netlify.app/package/tools/time.html is relevant for review.

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
    • (It doesn't touch code. I test-built the docs.)

dgw added 2 commits November 18, 2022 19:37
Was working on something in sopel-github and got annoyed that I had to
check `git blame` to verify that the functions I wanted to use would be
available in that plugin's minimum required Sopel version.

If people are nice to me, I might go through the rest of `sopel.tools`
and add any missing version annotations in its other submodules, too.
A missing blank line caught my eye, on the way to fixing some wonky
English that got missed during code review in the pre-7.x days.
@dgw dgw added Documentation Housekeeping Code cleanup, removal of deprecated stuff, etc. labels Nov 19, 2022
@dgw dgw added this to the 8.0.0 milestone Nov 19, 2022
@dgw dgw requested a review from a team November 19, 2022 07:58
Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change. I think we could have a spec for our docstrings that says "add the versionadded/changed at the bottom but before ..note and such". This is more or less what we did so far and I think it works for us.

@dgw
Copy link
Member Author

dgw commented Nov 21, 2022

versionadded/changed at the bottom but before ..note and such

Seems like that's what the Python docs do, in general, too. Which is probably why I used that style. 😁

@dgw dgw merged commit bd9efdd into master Dec 31, 2022
@dgw dgw deleted the tools.time-version-annotations branch December 31, 2022 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Housekeeping Code cleanup, removal of deprecated stuff, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants