Coding Guidelines - WordWiseProject/WordWise GitHub Wiki

Coding Guidelines

These are the following coding standards that we are using in this project.

  1. Limit all lines to a maximum of 100 characters.
  2. Use spaces for the indentation method.
  3. Use double-quoted for a string quotes.
  4. Use lower_case_with_underscores(snake case) for variable naming conventions.
  5. Use The Sphinx docstring format for writing docstring. Example:
class Example(models.Model):
    """
    Example sentence for each definition.

    :param example: Example sentence.
    :type example: str
    :param example_of: The definition of this example.
    :type example_of: Definition
    """

    example = models.CharField(max_length=255)
    example_of = models.ForeignKey(Definition, on_delete=models.CASCADE)
  1. Using black, and flake8 with pre-commit for a style checker, and formatter before pushing code.