Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Panchenko committed May 24, 2024
1 parent 5245b03 commit f7e5324
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ ignore = [
"RET505",
"D106", # undocumented public nested class
"D205", # blank line after summary (prevents summary-only docstrings, which makes no sense)
"PLW0603", # using global statement
]
unfixable = [

Expand Down
7 changes: 5 additions & 2 deletions src/penai/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Contains configuration and remote storage utils.
"""Contains configuration and remote storage utils.
In its current, default form, configuration will be read from `config.json` and
the git-ignored file `config_local.json` (you have to create it yourself if you need it) and merged.
the git-ignored file `config_local.json` (you have to create it yourself if you need it) and merged.
The `config_local.json` is a good place to keep access keys and other secrets.
"""

Expand Down Expand Up @@ -49,6 +49,7 @@ def get_config(reload: bool = False) -> __Configuration:


def default_remote_storage() -> RemoteStorage:
"""Returns the default remote storage instance. It is created lazily."""
global __remote_storage_instance
if __remote_storage_instance is None:
__remote_storage_instance = RemoteStorage(get_config().remote_storage)
Expand All @@ -62,6 +63,7 @@ def pull_from_remote(
exclude_regex: Pattern | str | None = None,
dryrun: bool = False,
) -> TransactionSummary:
"""Pulls from the remote storage using the default storage config."""
return default_remote_storage().pull(
remote_path=remote_path,
local_base_dir=top_level_directory,
Expand All @@ -79,6 +81,7 @@ def push_to_remote(
exclude_regex: Pattern | str | None = None,
dryrun: bool = False,
) -> TransactionSummary:
"""Pushes to the remote storage using the default storage config."""
return default_remote_storage().push(
path=local_path,
local_path_prefix=top_level_directory,
Expand Down

0 comments on commit f7e5324

Please sign in to comment.