Skip to content

Commit

Permalink
Merge a2c65f2 into 41cafd6
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonCoderAS committed Dec 27, 2019
2 parents 41cafd6 + a2c65f2 commit aae96eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions praw/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Provides the code to load PRAW's configuration file `praw.ini`."""
from threading import Lock
import configparser
import os
import sys
from threading import Lock

from .exceptions import ClientException

Expand Down Expand Up @@ -50,13 +50,13 @@ def _load_config(cls):
cls.CONFIG = config

@property
def short_url(self):
def short_url(self) -> str:
"""Return the short url or raise a ClientException when not set."""
if self._short_url is self.CONFIG_NOT_SET:
raise ClientException("No short domain specified.")
return self._short_url

def __init__(self, site_name, **settings):
def __init__(self, site_name: str, **settings: str):
"""Initialize a Config instance."""
with Config.LOCK:
if Config.CONFIG is None:
Expand Down
1 change: 0 additions & 1 deletion praw/const.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""PRAW constants."""

from .endpoints import API_PATH # noqa: F401

__version__ = "6.4.1.dev0"
Expand Down
2 changes: 1 addition & 1 deletion praw/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PRAWException(Exception):
class APIException(PRAWException):
"""Indicate exception that involve responses from Reddit's API."""

def __init__(self, error_type, message, field):
def __init__(self, error_type: str, message: str, field: str):
"""Initialize an instance of APIException.
:param error_type: The error type set on Reddit's end.
Expand Down

0 comments on commit aae96eb

Please sign in to comment.