Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pronouns: accept they/them and they/them/theirs #2070

Merged
merged 2 commits into from
Jun 30, 2021

Conversation

half-duplex
Copy link
Member

@half-duplex half-duplex commented May 17, 2021

Description

Checks:

  • all five provided ("they/them/their/theirs/themselves")
  • prefix matches ("they/them[/...]", common)
  • subject/object/possessive ("they/them/theirs", common)
  • ellipsised ("they/.../themself", for compatibility with sopel 7.0 and pronoun.is)

Also fixes a typo ("eirslef").

Closes #2068
Furthers #2069

< mal> .setpronouns ze
< Sopel> mal: Thanks for telling me! I'll remember you use ze/hir/hir/hirs/hirself. Or, if you meant one of these, please tell me: ze/zir/zir/zirs/zirself
< mal> .setpronouns ze/hir
< Sopel> mal: Thanks for telling me! I'll remember you use ze/hir/hir/hirs/hirself.
< mal> .setpronouns they/.../themself
< Sopel> mal: Thanks for telling me! I'll remember you use they/them/their/theirs/themself.
< mal> .setpronouns they/them/theirs
< Sopel> mal: Thanks for telling me! I'll remember you use they/them/their/theirs/themselves. Or, if you meant one of these, please tell me: they/them/their/theirs/themself

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

@half-duplex half-duplex added this to the 7.1.0 milestone May 17, 2021
@lgtm-com

This comment has been minimized.

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.

I think we'll keep things simple for 7.1 and take #2069. This can go in early 8.0, ideally right before the pronouns plugin gets extracted into a standalone package.

sopel/modules/pronouns.py Outdated Show resolved Hide resolved
sopel/modules/pronouns.py Outdated Show resolved Hide resolved
@dgw dgw modified the milestones: 7.1.0, 8.0.0 May 24, 2021
@dgw
Copy link
Member

dgw commented Jun 30, 2021

This block is broken now that KNOWN_SETS is a list instead of a dict, btw.

for short, set_ in KNOWN_SETS.items():
if pronouns == set_:
break
short = pronouns

[2021-06-30 02:34:50,537] sopel.bot            ERROR    - Unexpected error ('list' object has no attribute 'items') from dgw at 2021-06-30 07:34:50.537146. Message was: ,pronouns dgw
Traceback (most recent call last):
  File "/mnt/c/Users/dgw/github/sopel/sopel/bot.py", line 757, in call_rule
    rule.execute(sopel, trigger)
  File "/mnt/c/Users/dgw/github/sopel/sopel/plugins/rules.py", line 1057, in execute
    exit_code = self._handler(bot, trigger)
  File "/mnt/c/Users/dgw/github/sopel/sopel/modules/pronouns.py", line 76, in pronouns
    say_pronouns(bot, trigger.group(3), pronouns)
  File "/mnt/c/Users/dgw/github/sopel/sopel/modules/pronouns.py", line 91, in say_pronouns
    for short, set_ in bot.memory['pronoun_sets'].items():
AttributeError: 'list' object has no attribute 'items'

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.

Let's just ship this with the conversion back to dict I made. I'll continue tweaking things as I implement the new feature I was working on (based on this branch) when I discovered the .pronouns-breaking regression.

@dgw dgw merged commit 6950249 into sopel-irc:master Jun 30, 2021
@half-duplex half-duplex deleted the pronouns-3 branch July 12, 2021 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants