StackGuardian / tirith

StackGuardian Policy Framework
Apache License 2.0
117 stars 37 forks source link

[HELP NEEDED] Add docstring to every function in tirith #90

Open refeed opened 1 year ago

refeed commented 1 year ago

Anyone are welcome to contribute to solve this issue! But there are rules to this:

  1. Please use the reST format when writing the docstring, e.g.
    
    """
    This is a reST style.

:param param1: this is a first param :param param2: this is a second param :returns: this is a description of what is returned :raises keyError: raises an exception """

2. Please only solve **one file** only per PR. This is to make the probability of people contributing to the same file smaller.
3. Please mention this issue on your commit and on your PR, e.g. you can add `Related to #90` to your commit description and PR.
4. Please use the format `<name of the file>.py: Add docstring` for the title of your PR and commit

**Is your feature request related to a problem? Please describe.**
Most functions in this project don't have docstring yet

E.g
```py
    @staticmethod
    def success(message: str) -> str:
        return TermStyle.str_with_style(message, TermStyle.LIGHT_GREEN + TermStyle.BOLD)

Describe the solution you'd like I'd like to see the functions in this project to have docstring

e.g.

    @staticmethod
    def success(message: str) -> str:
        """
        Print a success message with green color and bold style.
        """
        return TermStyle.str_with_style(message, TermStyle.LIGHT_GREEN + TermStyle.BOLD)

Describe alternatives you've considered There are many functions and modules in this project. Hence, this is a very big task, anyone can take this issue. Any PR that does this would be appreciated.

For the next step, we can also put pydocstyle linter in github workflow for a more standardized docstring style https://github.com/PyCQA/pydocstyle


ritikaaaa177 commented 2 months ago

Hi @refeed Please assign me this issue.

refeed commented 1 month ago

Everybody can just work on this task without being assigned and send PR directly because this is a very big task :)