Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
- id: check-case-conflict
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-dependabot
- id: check-github-workflows
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: ["--exit-non-zero-on-fix", "--fix"]
- id: ruff-format
exclude: ^(tests/fixtures/|tests/test_formatter/__snapshots__/)
ci:
autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
submodules: false
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

import os
import pathlib
import sys

import tomli

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, str(pathlib.Path('..').resolve()))


# -- Project information -----------------------------------------------------


def _get_project_meta():
with open('../pyproject.toml', mode='rb') as pyproject:
with pathlib.Path('../pyproject.toml').open(mode='rb') as pyproject:
return tomli.load(pyproject)['tool']['poetry']


pkg_meta = _get_project_meta()
project = str(pkg_meta['name'])
copyright = '2019, dry-python team' # noqa: WPS125
copyright = '2019, dry-python team' # noqa: A001
author = 'dry-python team'

# The short X.Y version
Expand All @@ -49,13 +50,10 @@ def _get_project_meta():
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',

# Used to include .md files:
'myst_parser',

# Used to insert typehints into the final docs:
'sphinx_autodoc_typehints',

# Used to build graphs:
'sphinxcontrib.mermaid',
]
Expand Down
1 change: 0 additions & 1 deletion docs/pages/converters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ API Reference

.. automodule:: returns.converters
:members:

Loading
Loading