Skip to content

Commit

Permalink
Improved docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaslassance committed Oct 1, 2024
1 parent 5c7c226 commit 37318a8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gitalong/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class Repository:
"""Aggregates all the Gitalong actions that can happen on a Git repository.
Raises:
git.exc.InvalidGitRepositoryError:
If the path is not in or the Git clone.
git.exc.InvalidGitRepositoryError: If the path is not in or the Git clone.
"""

_instances = {}
Expand Down Expand Up @@ -67,7 +66,8 @@ def __init__(
If true, the class will return "singleton" cached per clone.
Raises:
GitalongNotInstalled: Description
RepositoryInvalidConfig: If the store URL is not valid.
RepositoryNotSetup: If Gitalong is not installed on the repository.
"""
self._config = None
self._submodules = None
Expand Down Expand Up @@ -165,7 +165,9 @@ def setup(
def from_filename(cls, filename: str) -> Optional["Repository"]:
"""
Args:
filename (str): A path that belong to the repository including itself.
filename (str):
The absolute path to the clone or either the relative or
absolute path to one of its files.
Returns:
Optional[Repository]: The repository or None.
Expand All @@ -183,10 +185,8 @@ def _write_config_file(config: dict, path: str):
json.dump(config, config_file, indent=4, sort_keys=True)

def update_gitignore(self):
"""Update the .gitignore of the managed repository with Gitalong directives.
TODO: Improve update by considering what is already ignored.
"""
"""Update the .gitignore of the managed repository with Gitalong directives."""
# TODO: Improve by considering what is already ignored.
gitignore_path = os.path.join(self.working_dir, ".gitignore")
content = ""
if os.path.exists(gitignore_path):
Expand Down

0 comments on commit 37318a8

Please sign in to comment.