From 347f34bfc1653e50859ecb575de7b362c58d7ba0 Mon Sep 17 00:00:00 2001 From: Celeo Date: Fri, 10 Nov 2023 17:00:14 -0800 Subject: [PATCH] Fix lints --- preston/preston.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/preston/preston.py b/preston/preston.py index 9291a40..08715a3 100644 --- a/preston/preston.py +++ b/preston/preston.py @@ -1,5 +1,4 @@ import base64 -from dataclasses import dataclass import re import time from typing import Optional, Tuple, Any, Union @@ -226,7 +225,7 @@ def _get_spec(self) -> dict: If the spec has already been fetched, the cached version is returned instead. - ArgS: + Args: None Returns: @@ -244,7 +243,7 @@ def _get_path_for_op_id(self, id: str) -> Optional[str]: id: operation id Returns: - path to the endpoint, or None if not found + path to the endpoint, or `None` if not found """ for path_key, path_value in self._get_spec()["paths"].items(): for method in self.METHODS: @@ -324,9 +323,12 @@ def get_path(self, path: str, data: dict) -> Tuple[dict, dict]: def get_op(self, id: str, **kwargs: str) -> dict: """Queries the ESI by looking up an operation id. - Endpoints are cached, so calls to this method - for the same op and args will return the data - from the cache instead of making the API call. + Endpoints are cached, so calls to this method for the + same op and args will return the data from the cache + instead of making the API call. + + Passed kwargs will first supply parameters in the URL, + and then unused items will be used as query params. Args: id: operation id