From 15e11300a88f3b5865113a314a1a659c26dd597c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 19 Jan 2025 22:23:42 +0200 Subject: [PATCH] Add more pre-commit-hooks lint --- .github/CONTRIBUTING.md | 2 +- .github/workflows/test.yml | 2 +- .pre-commit-config.yaml | 12 ++++++++++++ docs/development.rst | 6 +++--- docs/intro.rst | 1 - docs/tutorial.rst | 2 +- tests/files/issue_524.yaml | 2 +- tests/requirements.txt | 4 ++-- 8 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index cfb1fd09..4c82fbe2 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,7 +4,7 @@ This is a [Jazzband](https://jazzband.co/) project. By contributing you agree to by the [Contributor Code of Conduct](https://jazzband.co/about/conduct) and follow the [guidelines](https://jazzband.co/about/guidelines). -If you'd like to contribute, simply fork +If you'd like to contribute, simply fork [the repository](https://github.com/jazzband/tablib), commit your changes to a feature branch, and send a pull request to `master`. Make sure you add yourself to [AUTHORS](https://github.com/jazzband/tablib/blob/master/AUTHORS). diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6548ce0f..6a4a92c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ permissions: env: FORCE_COLOR: 1 PIP_DISABLE_PIP_VERSION_CHECK: 1 - + jobs: test: runs-on: ${{ matrix.os }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70cc463c..92fa8eb5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,9 +29,21 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: + - id: check-added-large-files + - id: check-case-conflict - id: check-merge-conflict - id: check-toml - id: check-yaml + - id: debug-statements + - id: end-of-file-fixer + - id: forbid-submodules + - id: requirements-txt-fixer + - id: trailing-whitespace + + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes ci: autoupdate_schedule: quarterly diff --git a/docs/development.rst b/docs/development.rst index de8bdd3c..08c7502e 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -125,8 +125,8 @@ registered. .. admonition:: Excluding Support - If the format excludes support for an import/export mechanism (*e.g.* - :class:`csv ` excludes + If the format excludes support for an import/export mechanism (*e.g.* + :class:`csv ` excludes :class:`Databook ` support), simply don't define the respective class methods. Appropriate errors will be raised. @@ -138,7 +138,7 @@ registered. registry.register('xxx', MyXXXFormatClass()) 3. From then on, you should be able to use your new custom format as if it were -a built-in Tablib format, e.g. using ``dataset.export('xxx')`` will use the +a built-in Tablib format, e.g. using ``dataset.export('xxx')`` will use the ``MyXXXFormatClass.export_set`` method. .. _testing: diff --git a/docs/intro.rst b/docs/intro.rst index 62b26e62..80beba96 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -60,4 +60,3 @@ Pythons Supported Python 3.6+ is officially supported. Now, go :ref:`install Tablib `. - diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 38f1786a..e4c2ae6f 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -313,7 +313,7 @@ Now that we have extra meta-data on our rows, we can easily filter our :class:`D >>> students.filter(['female']).yaml - {first: Bessie, Last: Monke} -By default, when you pass a list of tags you get filter type or. :: +By default, when you pass a list of tags you get filter type or. :: >>> students.filter(['female', 'creative']).yaml - {first: Daniel, Last: Dupont} diff --git a/tests/files/issue_524.yaml b/tests/files/issue_524.yaml index b0cf7100..308982a5 100644 --- a/tests/files/issue_524.yaml +++ b/tests/files/issue_524.yaml @@ -1 +1 @@ -title: Voice of Miki Vanoušek \ No newline at end of file +title: Voice of Miki Vanoušek diff --git a/tests/requirements.txt b/tests/requirements.txt index d2f56f91..7b98a100 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,7 +1,7 @@ -pytest -pytest-cov odfpy openpyxl>=2.6.0 +pytest +pytest-cov pyyaml tabulate xlrd