diff --git a/.editorconfig b/.editorconfig index e949e54..2ff2d74 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,6 +3,7 @@ root = true [*] +end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = space diff --git a/.gitignore b/.gitignore index 7bbc71c..6aceb9d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ __pycache__/ # Distribution / packaging .Python -env/ build/ develop-eggs/ dist/ @@ -24,6 +23,7 @@ wheels/ *.egg-info/ .installed.cfg *.egg +MANIFEST # PyInstaller # Usually these files are written by a python script from a template @@ -45,6 +45,7 @@ nosetests.xml coverage.xml *.cover .hypothesis/ +.pytest_cache/ # Translations *.mo @@ -53,6 +54,7 @@ coverage.xml # Django stuff: *.log local_settings.py +db.sqlite3 # Flask stuff: instance/ @@ -84,8 +86,11 @@ celerybeat-schedule # virtualenv .venv +env/ venv/ ENV/ +env.bak/ +venv.bak/ # Spyder project settings .spyderproject diff --git a/doggo.py b/doggo.py index 858e5b2..ac36b06 100644 --- a/doggo.py +++ b/doggo.py @@ -6,6 +6,7 @@ from errbot import botcmd, BotPlugin class Doggo(BotPlugin): """Fetch random dog image URLs""" + min_err_version = '3.0.0' # Optional, but recommended BASE_URL = 'https://dog.ceo/api' @@ -140,7 +141,7 @@ class Doggo(BotPlugin): return 'Breed not found: {}. List breeds with !listbreeds'.format(breed) else: return 'Please tell me the breed for which you want sub-breeds, like: *!reloadsubbreeds terrier*' - + try: resp = requests.get(url) resp.raise_for_status() @@ -151,7 +152,7 @@ class Doggo(BotPlugin): data = resp.json()['message'] if not isinstance(data, list): return 'Unable to load sub-breeds list' - + self.breeds[breed] = data if 'calledbyfunction' not in args: # Tell user command was successful