Skip to content

Ensure newline at end of _modidx.py #1186

Closed
@yasirroni

Description

@yasirroni

It is always nice that a file that we write is ended with an extra blank of line. I know that _modidx.py is automatically generated and we also can exclude pre-commit hook, but please consider to add a blank line in the end of _modidx.py to avoid error by end-of-file-fixer?

Below is my pre-commit regarding this.

  # nbdev clean and export
  - repo: https://github.com/fastai/nbdev
    rev: 2.2.10
    hooks:
    - id: nbdev_clean
    - id: nbdev_export

  # check yaml and end of file fixe
 - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.5.0
    hooks:
      - id: check-yaml
      - id: end-of-file-fixer
        exclude: LICENSE|^PACKAGENAME/_modidx.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions