Skip to content

Commit c6757bc

Browse files
committed
lint changes
1 parent 6bd2f92 commit c6757bc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

bookstack_file_exporter/common/util.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
urllib3.disable_warnings()
1515

1616
class HttpHelper:
17+
"""
18+
HttpHelper provides an http request helper with config stored and retries built in
19+
20+
Args:
21+
:headers: <Dict[str, str]> = all headers to use for http requests
22+
:config: <HttpConfig> = Configuration with user inputs for http requests
23+
24+
Returns:
25+
:HttpHelper: instance with methods to help with http requests.
26+
"""
1727
def __init__(self, headers: Dict[str, str],
1828
config: HttpConfig):
1929
self.backoff_factor = config.backoff_factor
@@ -23,7 +33,6 @@ def __init__(self, headers: Dict[str, str],
2333
self.verify_ssl = config.verify_ssl
2434
self._headers = headers
2535

26-
2736
# more details on options: https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html
2837
def http_get_request(self, url: str) -> requests.Response:
2938
"""make http requests and return response object"""

bookstack_file_exporter/config_helper/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ class UserInput(BaseModel):
4848
minio: Optional[ObjectStorageConfig] = None
4949
keep_last: Optional[int] = None
5050
run_interval: Optional[int] = 0
51-
http_config: Optional[HttpConfig] = HttpConfig()
51+
http_config: Optional[HttpConfig] = HttpConfig()

bookstack_file_exporter/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def entrypoint(args: argparse.Namespace):
1919
if config.user_inputs.run_interval:
2020
while True:
2121
exporter(config)
22-
log.info(f"Waiting {config.user_inputs.run_interval} seconds for next run")
22+
log.info("Waiting %s seconds for next run", config.user_inputs.run_interval)
2323
# sleep process state
2424
time.sleep(config.user_inputs.run_interval)
2525
exporter(config)

0 commit comments

Comments
 (0)