Skip to content

Commit

Permalink
Merge pull request #1067 from ClearcodeHQ/issue-1062
Browse files Browse the repository at this point in the history
Male pre-commit useful with standard hooks
  • Loading branch information
fizyk authored Jan 17, 2025
2 parents a6ddff6 + d611013 commit 5489b08
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
### What are the results


### What are the expected results
### What are the expected results
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
with:
python-version: "3.13"
command: towncrier check --compare-with origin/main
fetch-depth: 0
fetch-depth: 0
49 changes: 35 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
---
ci:
skip: [pipenv, mypy, black, ruff]
skip: [pipenv, mypy]

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
minimum_pre_commit_version: 4.0.0
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: trailing-whitespace
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-yaml
- id: pretty-format-json
- id: detect-private-key
- id: debug-statements

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
entry: black --config pyproject.toml .

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --respect-gitignore, --show-fixes]

- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.4
hooks:
- id: rstcheck
additional_dependencies: [sphinx]

- repo: local
hooks:
- id: pipenv
Expand All @@ -15,19 +49,6 @@ repos:
- python
- toml # Pipfile
pass_filenames: false
- id: black
name: black
entry: black
language: system
types:
- python
require_serial: true
- id: ruff
name: ruff
entry: ruff check
language: system
types_or:
- python
- id: mypy
name: mypy
entry: pipenv run mypy .
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ of pytest-postgresql along its history.
* Donald Stufft
* Will Vaughn
* Hugo (hugovk)
* Damian Skrzypczak
* Damian Skrzypczak
8 changes: 4 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Misc

- Error message typo fix
- Docker documentation example typo fixes
- Have setuptools required as package dependency. pkg_resources.parse_version is used in code
- Have setuptools required as package dependency. pkg_resources.parse_version is used in code
but setuptools was only used as build requirements

4.1.0
Expand Down Expand Up @@ -314,7 +314,7 @@ Bugfix
2.6.0
=====

- [enhancement] add ability to pass options to pg_ctl's -o flag to send arguments to the underlying postgres executable
- [enhancement] add ability to pass options to pg_ctl's -o flag to send arguments to the underlying postgres executable
Use `postgres_options` as fixture argument, `--postgresql-postgres-options` as pytest starting option or
`postgresql_postgres_options` as pytest.ini configuration option

Expand Down Expand Up @@ -364,7 +364,7 @@ Bugfix
=====

- [feature] Allow to set password for postgresql. Use it throughout the flow.
- [bugfix] Default Janitor's connections to postgres database. When using custom users,
- [bugfix] Default Janitor's connections to postgres database. When using custom users,
postgres attempts to use user's database and it might not exist.
- [bugfix] NoopExecutor connects to read version by context manager to properly handle cases
where it can't connect to the server.
Expand Down Expand Up @@ -399,7 +399,7 @@ Bugfix
1.4.1
=====

- [bugfix] Allow creating test database with hyphens
- [bugfix] Allow creating test database with hyphens

1.4.0
=====
Expand Down
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
2 changes: 1 addition & 1 deletion COPYING.lesser
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ General Public License ever published by the Free Software Foundation.
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Library.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. image:: https://raw.githubusercontent.com/ClearcodeHQ/pytest-postgresql/master/logo.png
:width: 100px
:height: 100px

pytest-postgresql
=================

Expand Down
1 change: 1 addition & 0 deletions newsfragments/1062.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add more built-in pre-commit hooks

0 comments on commit 5489b08

Please sign in to comment.