jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.58k stars 589 forks source link

Add flake8 hook to pre-commit #537

Closed peymanslh closed 1 year ago

peymanslh commented 1 year ago

Add flake8 to pre-commit and remove commented and old configs from the tox file.

codecov[bot] commented 1 year ago

Codecov Report

Merging #537 (edbbf1d) into master (8b9cf49) will not change coverage. The diff coverage is n/a.

:exclamation: Current head edbbf1d differs from pull request most recent head 4e9b7c6. Consider uploading reports for the commit 4e9b7c6 to get more accurate results

@@           Coverage Diff           @@
##           master     #537   +/-   ##
=======================================
  Coverage   91.13%   91.13%           
=======================================
  Files          28       28           
  Lines        2674     2674           
=======================================
  Hits         2437     2437           
  Misses        237      237           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

hugovk commented 1 year ago

We need to update docs/conf.py, something like:

 # The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'

(Black would have autoformatted these ;)

peymanslh commented 1 year ago

We need to update docs/conf.py, something like:

 # The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'

Yes, I will fix it. But I excluded docs/ in the flake8 config!(I don't know why it's not working :D)

hugovk commented 1 year ago

I think it's because pre-commit ignores the exclude list and scans all files in Git.

Let's include the docs directory, conf.py is a Python file after all so let's scan it too.