Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyDocStyle deprecation #5

Merged
merged 1 commit into from
Nov 18, 2023
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
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)