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

HK: add location counts to option descriptions #4083

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion worlds/hk/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
for option_name, option_data in pool_options.items():
extra_data = {"__module__": __name__, "items": option_data[0], "locations": option_data[1]}
if option_name in option_docstrings:
extra_data["__doc__"] = option_docstrings[option_name]
extra_data["__doc__"] = option_docstrings[option_name] + \
f"\n This option adds {len(option_data[0])} location(s)"
Copy link
Member

Choose a reason for hiding this comment

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

You could do this (also adds a missing final period):

Suggested change
f"\n This option adds {len(option_data[0])} location(s)"
f"\n This option adds {len(option_data[0])} location{'' if len(option_data[0]) == 1 else 's'}."

if option_name in default_on:
option = type(option_name, (DefaultOnToggle,), extra_data)
else:
Expand Down
Loading