Skip to content
Snippets Groups Projects
Commit b21fad9c authored by Gokhan OZBULAK's avatar Gokhan OZBULAK Committed by André Anjos
Browse files

Modified comments for better qa #60

parent f7618f2a
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,12 @@ from .click import ConfigCommand
logger = setup(__name__.split(".")[0], format="%(levelname)s: %(message)s")
def get_config():
"""Returns an instance of the Gitlab object for remote operations."""
"""Return an instance of the Gitlab object for remote operations.
Returns
-------
Gitlab entry and credential.
"""
cfg = pathlib.Path(os.path.expanduser("~/.python-gitlab.cfg"))
if cfg.exists():
......@@ -37,6 +42,20 @@ def get_config():
return gl, config
def create_temp_copy(source, target):
""" Create a copy of original file in temp folder.
Parameters
----------
source
Source file.
target
Target file.
Returns
-------
Path to target file in temp folder.
"""
temp_dir = tempfile.gettempdir()
target = os.path.join(temp_dir, target)
shutil.copy2(source, target)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment