diff --git a/umbr_api/add.py b/umbr_api/add.py index 6385977..a6af3ff 100644 --- a/umbr_api/add.py +++ b/umbr_api/add.py @@ -4,7 +4,7 @@ Note: When posting data to the Security Platform API, the following steps are - taken before the domain appears in a customer`s block list. The optional + taken before the domain appears in a customer's block list. The optional parameter "disableDstSafeguards" can be used to bypass parts of this process as outlined in the Generic Event Format Field Descriptions. The domain acceptance process is outlined from start to finish here: @@ -67,7 +67,7 @@ def add(domain=None, url=None, key=None, bypass=False): if domain != check_url: logger.warning( - "Domain name part from URL " "doesn`t match DNS domain name" + "Domain name part from URL doesn't match DNS domain name" ) logger.warning("DNS domain name: %s", domain) logger.warning("URL domain name: %s", check_url) diff --git a/umbr_api/credentials.py b/umbr_api/credentials.py index a59f377..813dd81 100644 --- a/umbr_api/credentials.py +++ b/umbr_api/credentials.py @@ -57,7 +57,7 @@ def _read_cfg(default_value=None, filename=None, key_to_read=None): try: file = open(json_config_file_name, "r") except FileNotFoundError as msg: - print("Error: Cannot find `{}`.".format(json_config_file_name)) + print("Error: Cannot find '{}'.".format(json_config_file_name)) print("Please provide credentials via json file or the keyring.") logger.debug(msg) raise SystemExit(2) @@ -65,7 +65,7 @@ def _read_cfg(default_value=None, filename=None, key_to_read=None): json_data = load(file) default_value = json_data[key_to_read] except KeyError as msg: - print("Error: Cannot find data with in `%s`", filename) + print("Error: Cannot find data with in '%s'", filename) logger.debug(msg) raise SystemExit(1) finally: diff --git a/umbr_api/data/umbrella_example.json b/umbr_api/data/umbrella_example.json index 8b437ee..2f326d4 100644 --- a/umbr_api/data/umbrella_example.json +++ b/umbr_api/data/umbrella_example.json @@ -1,7 +1,7 @@ { "orgid": "0000000", - "info": "_____Provide credentials as: `key:secret`, separated by colon_____", + "info": "_____Provide credentials as: 'key:secret', separated by colon_____", "reporting": "YourKeyIsHere:YourSecretIsHere", "management": "YourKeyIsHere:YourSecretIsHere", "enforcement": "YOUR-CUSTOMER-KEY-IS-HERE-0123456789" -} +} \ No newline at end of file diff --git a/umbr_api/get.py b/umbr_api/get.py index a99153d..222a8c3 100644 --- a/umbr_api/get.py +++ b/umbr_api/get.py @@ -11,8 +11,8 @@ >>> print(response.status_code) 200 - `PEP 484` type annotations are supported. If attribute, parameter, and - return types are annotated according to `PEP 484`, they do not need to be + PEP 484 type annotations are supported. If attribute, parameter, and + return types are annotated according to PEP 484, they do not need to be included in the docstring: Todo: @@ -41,7 +41,7 @@ def get_list(page=1, limit=10, key=None): Args: page (int): Page # to request. limit (int): Limit number of records to request. - key (str): API key, if not specify obtain via `key` module. + key (str): API key, if not specify obtain via ``key`` module. Returns: Return ``requests.Response`` object. diff --git a/umbr_api/reporting.py b/umbr_api/reporting.py index 4fe6984..1f9152b 100644 --- a/umbr_api/reporting.py +++ b/umbr_api/reporting.py @@ -47,7 +47,7 @@ def activity(cred=None, orgid=None, **kwargs): Unix (epoch) timestamp in milliseconds. (not implemented) Returns: - requests.Response: Return `requests.Response` class object + requests.Response: Return ``requests.Response`` class object """ cfg_file = kwargs.get("filename", "umbrella.json") @@ -83,7 +83,7 @@ def top_identities(destination, cred=None, orgid=None, **kwargs): orgid (str): Cisco Umbrella organization ID Returns: - requests.Response: Return `requests.Response` class object + requests.Response: Return ``requests.Response`` class object """ cfg_file = kwargs.get("filename", "umbrella.json") @@ -120,7 +120,7 @@ def recent(destination, cred=None, orgid=None, offset=0, **kwargs): the next fifty after that. Returns: - requests.Response: Return `requests.Response` class object + requests.Response: Return ``requests.Response`` class object """ cfg_file = kwargs.get("filename", "umbrella.json") diff --git a/umbr_api/umbrella.py b/umbr_api/umbrella.py index d100fcd..72c980e 100644 --- a/umbr_api/umbrella.py +++ b/umbr_api/umbrella.py @@ -333,8 +333,8 @@ def save_key(key, name): if read_key == key: print("OK") else: - print("Error: Provided credentials doesn" "t match to saved.") - logging.error("Provided credentials doesn" "t match to saved key.") + print("Error: Provided credentials doesn't match to saved.") + logging.error("Provided credentials doesn't match to saved key.") return 0 if read_key == key else 1