From 12c03fd2b1d88efa529195ba91c3a46f6ade2d3a Mon Sep 17 00:00:00 2001 From: Vignesh Rao Date: Sat, 17 Aug 2024 08:46:30 -0500 Subject: [PATCH] Update typehints and docstrings --- docs/index.html | 19 +++++++++++-------- docs/searchindex.js | 2 +- nctl/aws.py | 15 +++++++++------ nctl/logger.py | 5 +++-- nctl/models.py | 3 ++- nctl/ngrok.py | 3 ++- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/docs/index.html b/docs/index.html index 159471a..6fe04d6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -66,7 +66,7 @@

Welcome to NCTL’s documentation!

Ngrok Tunnel

-nctl.ngrok.distribution_handler(public_url: str, env_dump: dict) None
+nctl.ngrok.distribution_handler(public_url: str, env_dump: Dict[str, Any]) None

Updates the cloudfront distribution in a dedicated process.

Parameters:
@@ -100,7 +100,7 @@

Welcome to NCTL’s documentation!

AWS CloudFront

-class nctl.aws.CloudFront(env_dump: dict)
+class nctl.aws.CloudFront(env_dump: Dict[str, Any])

Initiates CloudFront object to get and update a cloudfront distribution.

>>> CloudFront
 
@@ -138,11 +138,14 @@

Welcome to NCTL’s documentation!
-update_distribution(current_config: dict, origin_name: str) None
+update_distribution(current_config: Dict[str, Any], origin_name: str) None

Updates the origin host of a cloudfront distribution.

Parameters:
-

origin_name – Origin name that has to be replaced with.

+
    +
  • current_config – Current configuration as in CloudFront.

  • +
  • origin_name – Origin name that has to be replaced with.

  • +

@@ -160,11 +163,11 @@

Welcome to NCTL’s documentation!
-store_config(configuration: dict = None) None
+store_config(configuration: Dict[str, Any] = None) None

Stores the cloudfront distribution config in a YAML file locally.

Parameters:
-

last_response – Last known response from AWS.

+

configuration – CloudFront distribution configuration.

@@ -198,7 +201,7 @@

Logger
-log_config: Optional[Union[dict, Path]]
+log_config: Optional[Union[Dict[str, Any], Path]]

@@ -352,7 +355,7 @@

Models
-log_config: Optional[Union[dict, Path]]
+log_config: Optional[Union[Dict[str, Any], Path]]

diff --git a/docs/searchindex.js b/docs/searchindex.js index 45a8306..99d2c8d 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["NCTL", "Welcome to NCTL\u2019s documentation!"], "terms": {"fuse": 0, "ngrok": 0, "cloudfront": 0, "offer": 0, "fulli": 0, "autom": 0, "solut": 0, "platform": 0, "support": 0, "deploy": 0, "recommend": 0, "instal": 0, "python": 0, "3": 0, "10": 0, "11": 0, "us": [0, 1], "dedic": [0, 1], "virtual": 0, "m": 0, "pip": 0, "initi": [0, 1], "id": [0, 1], "import": 0, "__name__": 0, "__main__": 0, "tunnel": 0, "cli": [0, 1], "start": [0, 1], "help": 0, "usag": 0, "instruct": 0, "sourc": 0, "from": [0, 1], "an": 0, "env": [0, 1], "file": [0, 1], "By": 0, "default": [0, 1], "look": 0, "current": 0, "work": 0, "directori": 0, "refer": [0, 1], "sampl": 0, "exampl": 0, "port": [0, 1], "number": 0, "expos": 0, "host": [0, 1], "hostnam": 0, "server": 0, "ha": [0, 1], "_": 0, "auth": [0, 1], "token": [0, 1], "config": [0, 1], "configur": [0, 1], "filepath": 0, "auto": 0, "creat": [0, 1], "when": 0, "i": [0, 1], "specifi": 0, "aw": 0, "profil": 0, "name": [0, 1], "access": 0, "kei": 0, "secret": 0, "region": 0, "distribut": [0, 1], "requir": 0, "updat": [0, 1], "exist": [0, 1], "new": [0, 1], "debug": [0, 1], "boolean": [0, 1], "flag": [0, 1], "enabl": [0, 1], "level": 0, "log": [0, 1], "simpl": 0, "option": [0, 1], "switch": 0, "between": 0, "stdout": [0, 1], "custom": [0, 1], "accept": 0, "yaml": [0, 1], "json": [0, 1], "ini": 0, "filetyp": [0, 1], "docstr": 0, "format": [0, 1], "googl": 0, "style": 0, "convent": 0, "pep": 0, "8": 0, "isort": 0, "gitvers": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "t": 0, "pre": 0, "commit": 0, "ensur": 0, "run": [0, 1], "pytest": 0, "gener": 0, "valid": [0, 1], "hyperlink": 0, "all": 0, "markdown": 0, "includ": 0, "wiki": 0, "page": [0, 1], "sphinx": 0, "5": 0, "1": [0, 1], "recommonmark": 0, "http": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": 0, "vignesh": 0, "rao": 0, "under": 0, "mit": 0, "kick": 1, "off": 1, "environ": 1, "variabl": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "distribution_handl": 1, "public_url": 1, "str": 1, "env_dump": 1, "dict": 1, "none": 1, "process": 1, "paramet": 1, "public": 1, "url": 1, "dump": 1, "writer": 1, "frame": 1, "extract": 1, "messag": 1, "part": 1, "each": 1, "line": 1, "kwarg": 1, "class": 1, "object": 1, "get": 1, "avail": 1, "otherwis": 1, "get_distribut": 1, "return": 1, "inform": 1, "type": 1, "create_distribut": 1, "update_distribut": 1, "current_config": 1, "origin_nam": 1, "origin": 1, "replac": 1, "await_deploi": 1, "last_respons": 1, "ani": 1, "wait": 1, "deploi": 1, "last": 1, "known": 1, "respons": 1, "store_config": 1, "store": 1, "local": 1, "logconfig": 1, "pydant": 1, "basemodel": 1, "bool": 1, "logopt": 1, "log_config": 1, "union": 1, "path": 1, "extra": 1, "ignor": 1, "addprocessnam": 1, "process_nam": 1, "wrapper": 1, "overrid": 1, "filter": 1, "add": 1, "processnam": 1, "take": 1, "ad": 1, "argument": 1, "record": 1, "logrecord": 1, "built": 1, "configure_log": 1, "base": 1, "keyword": 1, "disabl": 1, "mode": 1, "concurr": 1, "load": 1, "multiprocess": 1, "cloudfront_process": 1, "context": 1, "allow": 1, "arbitrari": 1, "arbitrary_types_allow": 1, "true": 1, "envconfig": 1, "baseset": 1, "set": 1, "int": 1, "ngrok_auth": 1, "ngrok_config": 1, "aws_profile_nam": 1, "aws_access_key_id": 1, "aws_secret_access_kei": 1, "aws_default_region": 1, "distribution_id": 1, "distribution_config": 1, "configdir": 1, "classmethod": 1, "from_env_fil": 1, "env_fil": 1, "instanc": 1, "hide_input_in_error": 1, "valu": 1, "modul": 1, "qualnam": 1, "boundari": 1, "enum": 1, "create_ngrok_config": 1, "filenam": 1, "env_load": 1, "o": 1, "pathlik": 1, "where": 1, "var": 1, "have": 1, "run_valid": 1, "check": 1, "rais": 1, "assertionerror": 1, "If": 1, "fail": 1, "index": 1, "search": 1}, "objects": {"nctl": [[1, 0, 0, "-", "aws"], [1, 0, 0, "-", "logger"], [1, 0, 0, "-", "models"], [1, 0, 0, "-", "ngrok"], [1, 0, 0, "-", "squire"]], "nctl.aws": [[1, 1, 1, "", "CloudFront"]], "nctl.aws.CloudFront": [[1, 2, 1, "", "await_deploy"], [1, 2, 1, "", "create_distribution"], [1, 2, 1, "", "get_distribution"], [1, 2, 1, "", "run"], [1, 2, 1, "", "store_config"], [1, 2, 1, "", "update_distribution"]], "nctl.logger": [[1, 1, 1, "", "AddProcessName"], [1, 1, 1, "", "LogConfig"], [1, 4, 1, "", "configure_logging"]], "nctl.logger.AddProcessName": [[1, 2, 1, "", "filter"]], "nctl.logger.LogConfig": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "debug"], [1, 3, 1, "", "log"], [1, 3, 1, "", "log_config"], [1, 3, 1, "", "process"]], "nctl.logger.LogConfig.Config": [[1, 3, 1, "", "extra"]], "nctl.models": [[1, 1, 1, "", "Concurrency"], [1, 1, 1, "", "EnvConfig"], [1, 1, 1, "", "LogOptions"]], "nctl.models.Concurrency": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "cloudfront_process"]], "nctl.models.Concurrency.Config": [[1, 3, 1, "", "arbitrary_types_allowed"]], "nctl.models.EnvConfig": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "aws_access_key_id"], [1, 3, 1, "", "aws_default_region"], [1, 3, 1, "", "aws_profile_name"], [1, 3, 1, "", "aws_secret_access_key"], [1, 3, 1, "", "configdir"], [1, 3, 1, "", "debug"], [1, 3, 1, "", "distribution_config"], [1, 3, 1, "", "distribution_id"], [1, 2, 1, "", "from_env_file"], [1, 3, 1, "", "host"], [1, 3, 1, "", "log"], [1, 3, 1, "", "log_config"], [1, 3, 1, "", "ngrok_auth"], [1, 3, 1, "", "ngrok_config"], [1, 3, 1, "", "port"]], "nctl.models.EnvConfig.Config": [[1, 3, 1, "", "extra"], [1, 3, 1, "", "hide_input_in_errors"]], "nctl.models.LogOptions": [[1, 3, 1, "", "file"], [1, 3, 1, "", "stdout"]], "nctl.ngrok": [[1, 4, 1, "", "distribution_handler"], [1, 4, 1, "", "tunnel"], [1, 4, 1, "", "writer"]], "nctl.squire": [[1, 4, 1, "", "create_ngrok_config"], [1, 4, 1, "", "env_loader"], [1, 4, 1, "", "run_validations"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"nctl": [0, 1], "kick": 0, "off": 0, "environ": 0, "variabl": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "content": 1, "ngrok": 1, "tunnel": 1, "aw": 1, "cloudfront": 1, "logger": 1, "model": 1, "squir": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file +Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["NCTL", "Welcome to NCTL\u2019s documentation!"], "terms": {"fuse": 0, "ngrok": 0, "cloudfront": 0, "offer": 0, "fulli": 0, "autom": 0, "solut": 0, "platform": 0, "support": 0, "deploy": 0, "recommend": 0, "instal": 0, "python": 0, "3": 0, "10": 0, "11": 0, "us": [0, 1], "dedic": [0, 1], "virtual": 0, "m": 0, "pip": 0, "initi": [0, 1], "id": [0, 1], "import": 0, "__name__": 0, "__main__": 0, "tunnel": 0, "cli": [0, 1], "start": [0, 1], "help": 0, "usag": 0, "instruct": 0, "sourc": 0, "from": [0, 1], "an": 0, "env": [0, 1], "file": [0, 1], "By": 0, "default": [0, 1], "look": 0, "current": [0, 1], "work": 0, "directori": 0, "refer": [0, 1], "sampl": 0, "exampl": 0, "port": [0, 1], "number": 0, "expos": 0, "host": [0, 1], "hostnam": 0, "server": 0, "ha": [0, 1], "_": 0, "auth": [0, 1], "token": [0, 1], "config": [0, 1], "configur": [0, 1], "filepath": 0, "auto": 0, "creat": [0, 1], "when": 0, "i": [0, 1], "specifi": 0, "aw": 0, "profil": 0, "name": [0, 1], "access": 0, "kei": 0, "secret": 0, "region": 0, "distribut": [0, 1], "requir": 0, "updat": [0, 1], "exist": [0, 1], "new": [0, 1], "debug": [0, 1], "boolean": [0, 1], "flag": [0, 1], "enabl": [0, 1], "level": 0, "log": [0, 1], "simpl": 0, "option": [0, 1], "switch": 0, "between": 0, "stdout": [0, 1], "custom": [0, 1], "accept": 0, "yaml": [0, 1], "json": [0, 1], "ini": 0, "filetyp": [0, 1], "docstr": 0, "format": [0, 1], "googl": 0, "style": 0, "convent": 0, "pep": 0, "8": 0, "isort": 0, "gitvers": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "t": 0, "pre": 0, "commit": 0, "ensur": 0, "run": [0, 1], "pytest": 0, "gener": 0, "valid": [0, 1], "hyperlink": 0, "all": 0, "markdown": 0, "includ": 0, "wiki": 0, "page": [0, 1], "sphinx": 0, "5": 0, "1": [0, 1], "recommonmark": 0, "http": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": 0, "vignesh": 0, "rao": 0, "under": 0, "mit": 0, "kick": 1, "off": 1, "environ": 1, "variabl": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "distribution_handl": 1, "public_url": 1, "str": 1, "env_dump": 1, "dict": 1, "ani": 1, "none": 1, "process": 1, "paramet": 1, "public": 1, "url": 1, "dump": 1, "writer": 1, "frame": 1, "extract": 1, "messag": 1, "part": 1, "each": 1, "line": 1, "kwarg": 1, "class": 1, "object": 1, "get": 1, "avail": 1, "otherwis": 1, "get_distribut": 1, "return": 1, "inform": 1, "type": 1, "create_distribut": 1, "update_distribut": 1, "current_config": 1, "origin_nam": 1, "origin": 1, "replac": 1, "await_deploi": 1, "last_respons": 1, "wait": 1, "deploi": 1, "last": 1, "known": 1, "respons": 1, "store_config": 1, "store": 1, "local": 1, "logconfig": 1, "pydant": 1, "basemodel": 1, "bool": 1, "logopt": 1, "log_config": 1, "union": 1, "path": 1, "extra": 1, "ignor": 1, "addprocessnam": 1, "process_nam": 1, "wrapper": 1, "overrid": 1, "filter": 1, "add": 1, "processnam": 1, "take": 1, "ad": 1, "argument": 1, "record": 1, "logrecord": 1, "built": 1, "configure_log": 1, "base": 1, "keyword": 1, "disabl": 1, "mode": 1, "concurr": 1, "load": 1, "multiprocess": 1, "cloudfront_process": 1, "context": 1, "allow": 1, "arbitrari": 1, "arbitrary_types_allow": 1, "true": 1, "envconfig": 1, "baseset": 1, "set": 1, "int": 1, "ngrok_auth": 1, "ngrok_config": 1, "aws_profile_nam": 1, "aws_access_key_id": 1, "aws_secret_access_kei": 1, "aws_default_region": 1, "distribution_id": 1, "distribution_config": 1, "configdir": 1, "classmethod": 1, "from_env_fil": 1, "env_fil": 1, "instanc": 1, "hide_input_in_error": 1, "valu": 1, "modul": 1, "qualnam": 1, "boundari": 1, "enum": 1, "create_ngrok_config": 1, "filenam": 1, "env_load": 1, "o": 1, "pathlik": 1, "where": 1, "var": 1, "have": 1, "run_valid": 1, "check": 1, "rais": 1, "assertionerror": 1, "If": 1, "fail": 1, "index": 1, "search": 1}, "objects": {"nctl": [[1, 0, 0, "-", "aws"], [1, 0, 0, "-", "logger"], [1, 0, 0, "-", "models"], [1, 0, 0, "-", "ngrok"], [1, 0, 0, "-", "squire"]], "nctl.aws": [[1, 1, 1, "", "CloudFront"]], "nctl.aws.CloudFront": [[1, 2, 1, "", "await_deploy"], [1, 2, 1, "", "create_distribution"], [1, 2, 1, "", "get_distribution"], [1, 2, 1, "", "run"], [1, 2, 1, "", "store_config"], [1, 2, 1, "", "update_distribution"]], "nctl.logger": [[1, 1, 1, "", "AddProcessName"], [1, 1, 1, "", "LogConfig"], [1, 4, 1, "", "configure_logging"]], "nctl.logger.AddProcessName": [[1, 2, 1, "", "filter"]], "nctl.logger.LogConfig": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "debug"], [1, 3, 1, "", "log"], [1, 3, 1, "", "log_config"], [1, 3, 1, "", "process"]], "nctl.logger.LogConfig.Config": [[1, 3, 1, "", "extra"]], "nctl.models": [[1, 1, 1, "", "Concurrency"], [1, 1, 1, "", "EnvConfig"], [1, 1, 1, "", "LogOptions"]], "nctl.models.Concurrency": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "cloudfront_process"]], "nctl.models.Concurrency.Config": [[1, 3, 1, "", "arbitrary_types_allowed"]], "nctl.models.EnvConfig": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "aws_access_key_id"], [1, 3, 1, "", "aws_default_region"], [1, 3, 1, "", "aws_profile_name"], [1, 3, 1, "", "aws_secret_access_key"], [1, 3, 1, "", "configdir"], [1, 3, 1, "", "debug"], [1, 3, 1, "", "distribution_config"], [1, 3, 1, "", "distribution_id"], [1, 2, 1, "", "from_env_file"], [1, 3, 1, "", "host"], [1, 3, 1, "", "log"], [1, 3, 1, "", "log_config"], [1, 3, 1, "", "ngrok_auth"], [1, 3, 1, "", "ngrok_config"], [1, 3, 1, "", "port"]], "nctl.models.EnvConfig.Config": [[1, 3, 1, "", "extra"], [1, 3, 1, "", "hide_input_in_errors"]], "nctl.models.LogOptions": [[1, 3, 1, "", "file"], [1, 3, 1, "", "stdout"]], "nctl.ngrok": [[1, 4, 1, "", "distribution_handler"], [1, 4, 1, "", "tunnel"], [1, 4, 1, "", "writer"]], "nctl.squire": [[1, 4, 1, "", "create_ngrok_config"], [1, 4, 1, "", "env_loader"], [1, 4, 1, "", "run_validations"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"nctl": [0, 1], "kick": 0, "off": 0, "environ": 0, "variabl": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "content": 1, "ngrok": 1, "tunnel": 1, "aw": 1, "cloudfront": 1, "logger": 1, "model": 1, "squir": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/nctl/aws.py b/nctl/aws.py index 50ade36..4542c3a 100644 --- a/nctl/aws.py +++ b/nctl/aws.py @@ -22,7 +22,7 @@ class CloudFront: """ - def __init__(self, env_dump: dict): + def __init__(self, env_dump: Dict[str, Any]): """Initiates the boto3 client and re-configures the environment variables. Args: @@ -86,7 +86,7 @@ def create_distribution(self) -> None: with open(models.env.distribution_config) as file: config = json.load(file) else: - # This shouldn't happen programatically, but just in case + # This shouldn't happen programmatically, but just in case # https://docs.pydantic.dev/latest/errors/validation_errors/#string_pattern_mismatch raise ValidationError.from_exception_data( title="NCTL", @@ -113,10 +113,13 @@ def create_distribution(self) -> None: error_response=create_response.get("ResponseMetadata"), ) - def update_distribution(self, current_config: dict, origin_name: str) -> None: + def update_distribution( + self, current_config: Dict[str, Any], origin_name: str + ) -> None: """Updates the origin host of a cloudfront distribution. Args: + current_config: Current configuration as in CloudFront. origin_name: Origin name that has to be replaced with. """ etag = current_config["ETag"] @@ -195,15 +198,15 @@ def await_deploy(self, last_response: Dict[str, Any]) -> None: except WaiterError as error: LOGGER.error("Error while waiting for distribution to deploy: %s", error) except KeyboardInterrupt: - LOGGER.warning("Cloudfront status check suspended") + LOGGER.warning("CloudFront status check suspended") finally: self.store_config(last_response) - def store_config(self, configuration: dict = None) -> None: + def store_config(self, configuration: Dict[str, Any] = None) -> None: """Stores the cloudfront distribution config in a YAML file locally. Args: - last_response: Last known response from AWS. + configuration: CloudFront distribution configuration. """ os.makedirs(models.env.configdir, exist_ok=True) configfile = os.path.join( diff --git a/nctl/logger.py b/nctl/logger.py index 28fd3c6..c53c0f5 100644 --- a/nctl/logger.py +++ b/nctl/logger.py @@ -1,7 +1,8 @@ import json -import logging +import logging.config import os from datetime import datetime +from typing import Any, Dict import yaml from pydantic import BaseModel, FilePath @@ -41,7 +42,7 @@ class LogConfig(BaseModel): debug: bool log: models.LogOptions process: str | None = None - log_config: dict | FilePath | None = None + log_config: Dict[str, Any] | FilePath | None = None class Config: """Extra configuration for LogConfig object.""" diff --git a/nctl/models.py b/nctl/models.py index 81d833c..a68b71c 100644 --- a/nctl/models.py +++ b/nctl/models.py @@ -2,6 +2,7 @@ import pathlib import socket from enum import Enum +from typing import Any, Dict from pydantic import BaseModel, FilePath, PositiveInt from pydantic_settings import BaseSettings @@ -60,7 +61,7 @@ class EnvConfig(BaseSettings): # Logging config debug: bool = False log: LogOptions = LogOptions.stdout - log_config: dict | FilePath | None = None + log_config: Dict[str, Any] | FilePath | None = None @classmethod def from_env_file(cls, env_file: pathlib.Path) -> "EnvConfig": diff --git a/nctl/ngrok.py b/nctl/ngrok.py index 5b41b97..803cfe6 100644 --- a/nctl/ngrok.py +++ b/nctl/ngrok.py @@ -2,6 +2,7 @@ import multiprocessing import os import subprocess +from typing import Any, Dict from nctl import aws, logger, models, squire @@ -9,7 +10,7 @@ # Have this as a dedicated function to avoid pickling error -def distribution_handler(public_url: str, env_dump: dict) -> None: +def distribution_handler(public_url: str, env_dump: Dict[str, Any]) -> None: """Updates the cloudfront distribution in a dedicated process. Args: