KwanLab / Autometa

Autometa: Automated Extraction of Genomes from Shotgun Metagenomes
https://autometa.readthedocs.io
Other
40 stars 15 forks source link

Add "remove unused imports" hook to pre-commit hooks #330

Closed evanroyrees closed 10 months ago

evanroyrees commented 1 year ago

Add hook to pre-commit hooks config to remove unused imports in python files.

See https://pre-commit.com/hooks.html (cmd+F pycln) for list of pre-commit hooks.

This looks promising: https://github.com/hadialqattan/pycln

The relevant code for .pre-commit-config.yaml 🍝 https://hadialqattan.github.io/pycln/#/?id=integrations

Append to .pre-commit-config.yaml:

- repo: https://github.com/hadialqattan/pycln
  rev: v2.1.5 # Possible releases: https://github.com/hadialqattan/pycln/releases
  hooks:
    - id: pycln