diff options
| -rw-r--r-- | bot/exts/halloween/candy_collection.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/hacktoberstats.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/halloween_facts.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/halloweenify.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/monstersurvey.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/spookyrating.py | 2 | ||||
| -rw-r--r-- | bot/exts/pride/drag_queen_name.py | 2 | ||||
| -rw-r--r-- | bot/exts/pride/pride_anthem.py | 2 | ||||
| -rw-r--r-- | bot/exts/pride/pride_facts.py | 2 | ||||
| -rw-r--r-- | bot/exts/valentines/be_my_valentine.py | 2 | ||||
| -rw-r--r-- | bot/exts/valentines/lovecalculator.py | 2 | ||||
| -rw-r--r-- | bot/exts/valentines/myvalenstate.py | 2 | ||||
| -rw-r--r-- | bot/exts/valentines/valentine_zodiac.py | 2 | ||||
| -rw-r--r-- | bot/exts/valentines/whoisvalentine.py | 2 | 
14 files changed, 14 insertions, 14 deletions
diff --git a/bot/exts/halloween/candy_collection.py b/bot/exts/halloween/candy_collection.py index 90c29eb2..1f79d4e6 100644 --- a/bot/exts/halloween/candy_collection.py +++ b/bot/exts/halloween/candy_collection.py @@ -27,7 +27,7 @@ class CandyCollection(commands.Cog):      def __init__(self, bot: commands.Bot):          self.bot = bot -        with open(json_location) as candy: +        with open(json_location, encoding="utf8") as candy:              self.candy_json = json.load(candy)              self.msg_reacted = self.candy_json['msg_reacted']          self.get_candyinfo = dict() diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py index e01ee50c..d63ce39d 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/halloween/hacktoberstats.py @@ -123,7 +123,7 @@ class HacktoberStats(commands.Cog):          """          if self.link_json.exists():              logging.info(f"Loading linked GitHub accounts from '{self.link_json}'") -            with open(self.link_json, 'r') as file: +            with open(self.link_json, 'r', encoding="utf8") as file:                  linked_accounts = json.load(file)              logging.info(f"Loaded {len(linked_accounts)} linked GitHub accounts from '{self.link_json}'") diff --git a/bot/exts/halloween/halloween_facts.py b/bot/exts/halloween/halloween_facts.py index 44a66ab2..7eb6d56f 100644 --- a/bot/exts/halloween/halloween_facts.py +++ b/bot/exts/halloween/halloween_facts.py @@ -29,7 +29,7 @@ class HalloweenFacts(commands.Cog):      def __init__(self, bot: commands.Bot):          self.bot = bot -        with open(Path("bot/resources/halloween/halloween_facts.json"), "r") as file: +        with open(Path("bot/resources/halloween/halloween_facts.json"), "r", encoding="utf8") as file:              self.halloween_facts = json.load(file)          self.facts = list(enumerate(self.halloween_facts))          random.shuffle(self.facts) diff --git a/bot/exts/halloween/halloweenify.py b/bot/exts/halloween/halloweenify.py index 5c433a81..aae7590a 100644 --- a/bot/exts/halloween/halloweenify.py +++ b/bot/exts/halloween/halloweenify.py @@ -21,7 +21,7 @@ class Halloweenify(commands.Cog):      async def halloweenify(self, ctx: commands.Context) -> None:          """Change your nickname into a much spookier one!"""          async with ctx.typing(): -            with open(Path("bot/resources/halloween/halloweenify.json"), "r") as f: +            with open(Path("bot/resources/halloween/halloweenify.json"), "r", encoding="utf8") as f:                  data = load(f)              # Choose a random character from our list we loaded above and set apart the nickname and image url. diff --git a/bot/exts/halloween/monstersurvey.py b/bot/exts/halloween/monstersurvey.py index 27da79b6..3b358212 100644 --- a/bot/exts/halloween/monstersurvey.py +++ b/bot/exts/halloween/monstersurvey.py @@ -27,7 +27,7 @@ class MonsterSurvey(Cog):          """Initializes values for the bot to use within the voting commands."""          self.bot = bot          self.registry_location = os.path.join(os.getcwd(), 'bot', 'resources', 'halloween', 'monstersurvey.json') -        with open(self.registry_location, 'r') as jason: +        with open(self.registry_location, 'r', encoding="utf8") as jason:              self.voter_registry = json.load(jason)      def json_write(self) -> None: diff --git a/bot/exts/halloween/spookyrating.py b/bot/exts/halloween/spookyrating.py index 1a48194e..6f069f8c 100644 --- a/bot/exts/halloween/spookyrating.py +++ b/bot/exts/halloween/spookyrating.py @@ -11,7 +11,7 @@ from bot.constants import Colours  log = logging.getLogger(__name__) -with Path("bot/resources/halloween/spooky_rating.json").open() as file: +with Path("bot/resources/halloween/spooky_rating.json").open(encoding="utf8") as file:      SPOOKY_DATA = json.load(file)      SPOOKY_DATA = sorted((int(key), value) for key, value in SPOOKY_DATA.items()) diff --git a/bot/exts/pride/drag_queen_name.py b/bot/exts/pride/drag_queen_name.py index 95297745..fca9750f 100644 --- a/bot/exts/pride/drag_queen_name.py +++ b/bot/exts/pride/drag_queen_name.py @@ -18,7 +18,7 @@ class DragNames(commands.Cog):      @staticmethod      def load_names() -> list:          """Loads a list of drag queen names.""" -        with open(Path("bot/resources/pride/drag_queen_names.json"), "r", encoding="utf-8") as f: +        with open(Path("bot/resources/pride/drag_queen_names.json"), "r", encoding="utf8") as f:              return json.load(f)      @commands.command(name="dragname", aliases=["dragqueenname", "queenme"]) diff --git a/bot/exts/pride/pride_anthem.py b/bot/exts/pride/pride_anthem.py index 186c5fff..33cb2a9d 100644 --- a/bot/exts/pride/pride_anthem.py +++ b/bot/exts/pride/pride_anthem.py @@ -34,7 +34,7 @@ class PrideAnthem(commands.Cog):      @staticmethod      def load_vids() -> list:          """Loads a list of videos from the resources folder as dictionaries.""" -        with open(Path("bot/resources/pride/anthems.json"), "r", encoding="utf-8") as f: +        with open(Path("bot/resources/pride/anthems.json"), "r", encoding="utf8") as f:              anthems = json.load(f)          return anthems diff --git a/bot/exts/pride/pride_facts.py b/bot/exts/pride/pride_facts.py index c453bfa1..9ff4c9e0 100644 --- a/bot/exts/pride/pride_facts.py +++ b/bot/exts/pride/pride_facts.py @@ -30,7 +30,7 @@ class PrideFacts(commands.Cog):      @staticmethod      def load_facts() -> dict:          """Loads a dictionary of years mapping to lists of facts.""" -        with open(Path("bot/resources/pride/facts.json"), "r", encoding="utf-8") as f: +        with open(Path("bot/resources/pride/facts.json"), "r", encoding="utf8") as f:              return json.load(f)      @seasonal_task(Month.JUNE) diff --git a/bot/exts/valentines/be_my_valentine.py b/bot/exts/valentines/be_my_valentine.py index e5e71d25..b1258307 100644 --- a/bot/exts/valentines/be_my_valentine.py +++ b/bot/exts/valentines/be_my_valentine.py @@ -27,7 +27,7 @@ class BeMyValentine(commands.Cog):      def load_json() -> dict:          """Load Valentines messages from the static resources."""          p = Path("bot/resources/valentines/bemyvalentine_valentines.json") -        with p.open() as json_data: +        with p.open(encoding="utf8") as json_data:              valentines = load(json_data)              return valentines diff --git a/bot/exts/valentines/lovecalculator.py b/bot/exts/valentines/lovecalculator.py index e11e062b..c75ea6cf 100644 --- a/bot/exts/valentines/lovecalculator.py +++ b/bot/exts/valentines/lovecalculator.py @@ -15,7 +15,7 @@ from bot.constants import Roles  log = logging.getLogger(__name__) -with Path("bot/resources/valentines/love_matches.json").open() as file: +with Path("bot/resources/valentines/love_matches.json").open(encoding="utf8") as file:      LOVE_DATA = json.load(file)      LOVE_DATA = sorted((int(key), value) for key, value in LOVE_DATA.items()) diff --git a/bot/exts/valentines/myvalenstate.py b/bot/exts/valentines/myvalenstate.py index 7d8737c4..01801847 100644 --- a/bot/exts/valentines/myvalenstate.py +++ b/bot/exts/valentines/myvalenstate.py @@ -11,7 +11,7 @@ from bot.constants import Colours  log = logging.getLogger(__name__) -with open(Path("bot/resources/valentines/valenstates.json"), "r") as file: +with open(Path("bot/resources/valentines/valenstates.json"), "r", encoding="utf8") as file:      STATES = json.load(file) diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/valentines/valentine_zodiac.py index 1a1273aa..ef9ddc78 100644 --- a/bot/exts/valentines/valentine_zodiac.py +++ b/bot/exts/valentines/valentine_zodiac.py @@ -25,7 +25,7 @@ class ValentineZodiac(commands.Cog):      def load_json() -> dict:          """Load zodiac compatibility from static JSON resource."""          p = Path("bot/resources/valentines/zodiac_compatibility.json") -        with p.open() as json_data: +        with p.open(encoding="utf8") as json_data:              zodiacs = load(json_data)              return zodiacs diff --git a/bot/exts/valentines/whoisvalentine.py b/bot/exts/valentines/whoisvalentine.py index 4ca0289c..0ff9186c 100644 --- a/bot/exts/valentines/whoisvalentine.py +++ b/bot/exts/valentines/whoisvalentine.py @@ -10,7 +10,7 @@ from bot.constants import Colours  log = logging.getLogger(__name__) -with open(Path("bot/resources/valentines/valentine_facts.json"), "r") as file: +with open(Path("bot/resources/valentines/valentine_facts.json"), "r", encoding="utf8") as file:      FACTS = json.load(file)  |