Skip to content

Commit

Permalink
refactor: rename options to autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
natelandau committed Nov 6, 2023
1 parent 05adf62 commit 3000d43
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ repos:
- id: vulture

- repo: "https://github.com/crate-ci/typos"
rev: v1.16.22
rev: v1.16.23
hooks:
- id: typos

Expand Down
24 changes: 12 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
aiofiles = "^23.2.1"
arrow = "^1.3.0"
beanie = "^1.23.1"
boto3 = "^1.28.76"
boto3 = "^1.28.78"
inflect = "^7.0.0"
loguru = "^0.7.2"
numpy = "^1.26.1"
Expand All @@ -47,15 +47,15 @@
[tool.poetry.group.dev.dependencies]
black = "^23.10.1"
commitizen = "^3.12.0"
coverage = "^7.3.1"
coverage = "^7.3.2"
mypy = "^1.6.1"
pdoc = "^14.0.0"
poethepoet = "^0.22.1"
pre-commit = "^3.5.0"
ruff = "^0.1.3"
ruff = "^0.1.4"
shellcheck-py = "^0.9.0.5"
types-aiofiles = "^23.2.0.0"
typos = "^1.16.22"
typos = "^1.16.23"
vulture = "^2.10"

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion src/valentina/cogs/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from valentina.constants import MAX_FIELD_COUNT, MAX_PAGE_CHARACTER_COUNT
from valentina.models import Campaign, CampaignChapter, CampaignNote, CampaignNPC, Guild
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.autocomplete import select_campaign, select_chapter, select_note, select_npc
from valentina.utils.converters import ValidCampaign, ValidYYYYMMDD
from valentina.utils.helpers import truncate_string
from valentina.utils.options import select_campaign, select_chapter, select_note, select_npc
from valentina.views import ChapterModal, NoteModal, NPCModal, confirm_action, present_embed


Expand Down
18 changes: 9 additions & 9 deletions src/valentina/cogs/characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
from valentina.models.aws import AWSService
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils import errors
from valentina.utils.autocomplete import (
select_any_player_character,
select_char_class,
select_char_trait,
select_custom_section,
select_player_character,
select_trait_category,
select_vampire_clan,
)
from valentina.utils.converters import (
ValidCharacterName,
ValidCharacterObject,
Expand All @@ -34,15 +43,6 @@
fetch_data_from_url,
truncate_string,
)
from valentina.utils.options import (
select_any_player_character,
select_char_class,
select_char_trait,
select_custom_section,
select_player_character,
select_trait_category,
select_vampire_clan,
)
from valentina.views import (
BioModal,
CustomSectionModal,
Expand Down
6 changes: 3 additions & 3 deletions src/valentina/cogs/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
from valentina.models import Character, GlobalProperty, Guild, RollProbability, User
from valentina.models.aws import AWSService
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.changelog_parser import ChangelogParser
from valentina.utils.converters import ValidCharClass
from valentina.utils.options import (
from valentina.utils.autocomplete import (
select_aws_object_from_guild,
select_changelog_version_1,
select_changelog_version_2,
select_char_class,
)
from valentina.utils.changelog_parser import ChangelogParser
from valentina.utils.converters import ValidCharClass
from valentina.views import confirm_action, present_embed

p = inflect.engine()
Expand Down
2 changes: 1 addition & 1 deletion src/valentina/cogs/experience.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from valentina.constants import TraitCategory, XPMultiplier
from valentina.models import User
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.autocomplete import select_player_character, select_trait_from_char_option
from valentina.utils.converters import (
ValidCharacterObject,
ValidCharTrait,
)
from valentina.utils.helpers import get_trait_multiplier, get_trait_new_value
from valentina.utils.options import select_player_character, select_trait_from_char_option
from valentina.views import confirm_action, present_embed

p = inflect.engine()
Expand Down
2 changes: 1 addition & 1 deletion src/valentina/cogs/gameplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from valentina.constants import DEFAULT_DIFFICULTY, DiceType
from valentina.models import User
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.options import select_char_trait, select_char_trait_two, select_macro
from valentina.utils.autocomplete import select_char_trait, select_char_trait_two, select_macro
from valentina.utils.perform_roll import perform_roll


Expand Down
4 changes: 2 additions & 2 deletions src/valentina/cogs/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

from valentina.models import User, UserMacro
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.helpers import truncate_string
from valentina.utils.options import (
from valentina.utils.autocomplete import (
select_char_trait,
select_char_trait_two,
select_macro,
)
from valentina.utils.helpers import truncate_string
from valentina.views import MacroCreateModal, confirm_action, present_embed


Expand Down
8 changes: 4 additions & 4 deletions src/valentina/cogs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
from valentina.constants import DiceType, EmbedColor, RollResultType
from valentina.models import Character, Guild, Probability, Statistics, User
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.changelog_parser import ChangelogParser
from valentina.utils.converters import ValidImageURL
from valentina.utils.helpers import fetch_random_name
from valentina.utils.options import (
from valentina.utils.autocomplete import (
select_changelog_version_1,
select_changelog_version_2,
select_country,
)
from valentina.utils.changelog_parser import ChangelogParser
from valentina.utils.converters import ValidImageURL
from valentina.utils.helpers import fetch_random_name
from valentina.views import confirm_action

p = inflect.engine()
Expand Down
24 changes: 12 additions & 12 deletions src/valentina/cogs/storyteller.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
from valentina.models import Character, User
from valentina.models.aws import AWSService
from valentina.models.bot import Valentina, ValentinaContext
from valentina.utils.autocomplete import (
select_any_player_character,
select_char_class,
select_char_concept,
select_char_level,
select_country,
select_storyteller_character,
select_trait_category,
select_trait_from_char_option,
select_trait_from_char_option_two,
select_vampire_clan,
)
from valentina.utils.converters import (
ValidCharacterConcept,
ValidCharacterLevel,
Expand All @@ -34,18 +46,6 @@
from valentina.utils.helpers import (
fetch_data_from_url,
)
from valentina.utils.options import (
select_any_player_character,
select_char_class,
select_char_concept,
select_char_level,
select_country,
select_storyteller_character,
select_trait_category,
select_trait_from_char_option,
select_trait_from_char_option_two,
select_vampire_clan,
)
from valentina.utils.perform_roll import perform_roll
from valentina.views import (
ConfirmCancelButtons,
Expand Down
2 changes: 2 additions & 0 deletions src/valentina/models/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ def __init__(self, parent_dir: Path, version: str, *args: Any, **kwargs: Any):
logger.info(f"COGS: Loading - {cog.stem}")
self.load_extension(f"valentina.cogs.{cog.stem}")

logger.debug(f"COGS: Loaded {len(self.cogs)} cogs")

async def on_connect(self) -> None:
"""Perform early setup."""
# Initialize the mongodb database
Expand Down
File renamed without changes.

0 comments on commit 3000d43

Please sign in to comment.