Skip to content

Commit

Permalink
PyDocStyle deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daemo00 committed Nov 18, 2023
1 parent 9860912 commit 64aa6b4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
9 changes: 5 additions & 4 deletions template/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ repos:
rev: 1.7.5
hooks:
- id: bandit
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: pydocstyle
name: Enforce docstrings
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pycqa/docformatter
rev: v1.7.5
hooks:
Expand Down
26 changes: 13 additions & 13 deletions template/docs/source/conf.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

# -- Project information

project = '{{package_name}}'
project = "{{package_name}}"

# -- General configuration

extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx_immaterial',
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx_immaterial",
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}
intersphinx_disabled_domains = ['std']
intersphinx_disabled_domains = ["std"]

templates_path = ['_templates']
templates_path = ["_templates"]

# -- Options for HTML output

html_theme = 'sphinx_immaterial'
html_theme = "sphinx_immaterial"
html_theme_options = {
"repo_url": "https://github.com/<user>/<repo>",
"edit_uri": "blob/main/docs/source",
Expand Down Expand Up @@ -54,4 +54,4 @@ autodoc_default_options = {
}

# -- Options for EPUB output
epub_show_urls = 'footnote'
epub_show_urls = "footnote"
2 changes: 1 addition & 1 deletion template/src/{{package_name}}/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def parse_args(args=None):
"""Parse arguments."""
parser = argparse.ArgumentParser()
parser.add_argument(
'number',
"number",
type=float,
)
return parser.parse_args(args=args)
Expand Down
1 change: 0 additions & 1 deletion template/tests/test_cli.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ from {{package_name}}.cli import main


class TestCLI(unittest.TestCase):

def test_cli(self):
args = str(5)
self.assertEqual(main(args=args), 6)
1 change: 0 additions & 1 deletion template/tests/test_main.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ from {{package_name}}.main import add_one


class TestMain(unittest.TestCase):

def test_add_one(self):
self.assertEqual(add_one(5), 6)

0 comments on commit 64aa6b4

Please sign in to comment.