Skip to content

Commit

Permalink
Update types to be compatible with 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
eXamadeus committed Dec 26, 2023
1 parent 5f92d20 commit 5826773
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VENV_BIN ?= python3 -m venv
VENV_BIN ?= python3.9 -m venv
VENV_DIR ?= venv
PIP_CMD ?= pip3

Expand Down
7 changes: 4 additions & 3 deletions godaddypy/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from os import environ, path, makedirs
from pathlib import Path
from sys import stdout
from typing import Union

import yaml
from configloader import ConfigLoader
Expand Down Expand Up @@ -100,7 +101,7 @@ def __init__(self, api_key=None, api_secret=None, delegate=None, log_level=None)
self.__api_secret = self.__api_secret or (config.secret if config else api_secret)
self._config = config

def __parse_configuration(self) -> Configuration | None:
def __parse_configuration(self) -> Union[Configuration, None]:
# Get config from environment
env_config = self.__parse_env()

Expand All @@ -111,7 +112,7 @@ def __parse_configuration(self) -> Configuration | None:
# See: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
return self.__parse_file()

def __parse_file(self) -> Configuration | None:
def __parse_file(self) -> Union[Configuration, None]:
if not self or not path.exists(self._config_path):
return None

Expand All @@ -131,7 +132,7 @@ def __parse_file(self) -> Configuration | None:

return Configuration(key=key, secret=secret)

def __parse_env(self) -> Configuration | None:
def __parse_env(self) -> Union[Configuration, None]:
config = ConfigLoader()
config.update_from_env_namespace("GODADDY_API")

Expand Down

0 comments on commit 5826773

Please sign in to comment.