[Werewolf] Use relative imports

This commit is contained in:
Toby Harradine 2019-03-13 20:39:40 +11:00
parent d4f3ed3742
commit 490d41d390
9 changed files with 18 additions and 18 deletions

View File

@ -8,9 +8,9 @@ import discord
# Import all roles here # Import all roles here
from redbot.core import commands from redbot.core import commands
from werewolf.roles.seer import Seer from .roles.seer import Seer
from werewolf.roles.vanillawerewolf import VanillaWerewolf from .roles.vanillawerewolf import VanillaWerewolf
from werewolf.roles.villager import Villager from .roles.villager import Villager
from redbot.core.utils.menus import menu, prev_page, next_page, close_menu from redbot.core.utils.menus import menu, prev_page, next_page, close_menu
# All roles in this list for iterating # All roles in this list for iterating

View File

@ -5,10 +5,10 @@ from typing import List, Any, Dict, Set, Union
import discord import discord
from redbot.core import commands from redbot.core import commands
from werewolf.builder import parse_code from .builder import parse_code
from werewolf.player import Player from .player import Player
from werewolf.role import Role from .role import Role
from werewolf.votegroup import VoteGroup from .votegroup import VoteGroup
class Game: class Game:

View File

@ -1,4 +1,4 @@
from werewolf.role import Role from .role import Role
def night_immune(role: Role): def night_immune(role: Role):

View File

@ -1,5 +1,5 @@
from werewolf.night_powers import pick_target from ..night_powers import pick_target
from werewolf.role import Role from ..role import Role
class Seer(Role): class Seer(Role):

View File

@ -1,5 +1,5 @@
from werewolf.night_powers import pick_target from ..night_powers import pick_target
from werewolf.role import Role from ..role import Role
class Shifter(Role): class Shifter(Role):

View File

@ -1,6 +1,6 @@
from werewolf.role import Role from ..role import Role
from werewolf.votegroups.wolfvote import WolfVote from ..votegroups.wolfvote import WolfVote
class VanillaWerewolf(Role): class VanillaWerewolf(Role):

View File

@ -1,4 +1,4 @@
from werewolf.role import Role from ..role import Role
class Villager(Role): class Villager(Role):

View File

@ -1,6 +1,6 @@
import random import random
from werewolf.votegroup import VoteGroup from ..votegroup import VoteGroup
class WolfVote(VoteGroup): class WolfVote(VoteGroup):

View File

@ -5,8 +5,8 @@ from redbot.core import Config, checks
from redbot.core.bot import Red from redbot.core.bot import Red
from redbot.core import commands from redbot.core import commands
from werewolf.builder import GameBuilder, role_from_name, role_from_alignment, role_from_category, role_from_id from .builder import GameBuilder, role_from_name, role_from_alignment, role_from_category, role_from_id
from werewolf.game import Game from .game import Game
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
from typing import Any from typing import Any