File tree Expand file tree Collapse file tree 7 files changed +39
-55
lines changed Expand file tree Collapse file tree 7 files changed +39
-55
lines changed Original file line number Diff line number Diff line change 1
1
# See https://pre-commit.com for more information
2
2
# See https://pre-commit.com/hooks.html for more hooks
3
3
---
4
- default_language_version :
5
- # force all unspecified python hooks to run python3
6
- python : python3
7
4
repos :
8
- - repo : https://github.com/ambv/black
9
- rev : 23.7.0
10
- hooks :
11
- - id : black
12
5
- repo : https://github.com/pre-commit/pre-commit-hooks
13
- rev : v4.4 .0
6
+ rev : v5.0 .0
14
7
hooks :
15
8
- id : trailing-whitespace
16
9
- id : mixed-line-ending
@@ -23,12 +16,14 @@ repos:
23
16
- id : check-yaml
24
17
files : .*\.(yaml|yml)$
25
18
- id : check-added-large-files
26
- - repo : https://github.com/pycqa/flake8
27
- rev : 6.1.0
19
+ - repo : https://github.com/astral-sh/ruff-pre-commit
20
+ rev : v0.11.8
28
21
hooks :
29
- - id : flake8
22
+ - id : ruff
23
+ args : ['--fix', '--unsafe-fixes']
24
+ - id : ruff-format
30
25
- repo : https://github.com/pre-commit/mirrors-mypy
31
- rev : v1.5.1
26
+ rev : v1.15.0
32
27
hooks :
33
28
- id : mypy
34
29
additional_dependencies :
Original file line number Diff line number Diff line change 1
- [tool .black ]
1
+ [tool .ruff ]
2
2
line-length = 88
3
- target-version = [' py39' ]
4
- skip-string-normalization = true
5
- exclude = '''
6
- (
7
- /(
8
- \.eggs
9
- | \.git
10
- | \.tox
11
- | \.venv
12
- | build
13
- | dist
14
- )
15
- )
16
- '''
3
+ target-version = ' py39'
4
+
5
+ [tool .ruff .format ]
6
+ quote-style = " preserve"
7
+ docstring-code-format = true
Original file line number Diff line number Diff line change 1
1
"""
2
- sphinxcontrib
3
- ~~~~~~~~~~~~~
2
+ sphinxcontrib
3
+ ~~~~~~~~~~~~~
4
4
5
- This package is a namespace package that contains all extensions
6
- distributed in the ``sphinx-contrib`` distribution.
5
+ This package is a namespace package that contains all extensions
6
+ distributed in the ``sphinx-contrib`` distribution.
7
7
8
- :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
9
- :license: BSD, see LICENSE for details.
8
+ :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
9
+ :license: BSD, see LICENSE for details.
10
10
"""
11
11
12
12
__import__ ('pkg_resources' ).declare_namespace (__name__ )
Original file line number Diff line number Diff line change 1
1
"""
2
- sphinxcontrib.apidoc
3
- ~~~~~~~~~~~~~~~~~~~~
2
+ sphinxcontrib.apidoc
3
+ ~~~~~~~~~~~~~~~~~~~~
4
4
5
- A Sphinx extension for running 'sphinx-apidoc' on each build.
5
+ A Sphinx extension for running 'sphinx-apidoc' on each build.
6
6
7
- :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
8
- :license: BSD, see LICENSE for details.
7
+ :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
8
+ :license: BSD, see LICENSE for details.
9
9
"""
10
10
11
11
import pbr .version
Original file line number Diff line number Diff line change 1
1
"""
2
- sphinxcontrib.apidoc.ext
3
- ~~~~~~~~~~~~~~~~~~~~~~~~
2
+ sphinxcontrib.apidoc.ext
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
4
5
- A Sphinx extension for running 'sphinx-apidoc' on each build.
5
+ A Sphinx extension for running 'sphinx-apidoc' on each build.
6
6
7
- :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
8
- :license: BSD, see LICENSE for details.
7
+ :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
8
+ :license: BSD, see LICENSE for details.
9
9
"""
10
10
11
11
from os import path
@@ -28,9 +28,7 @@ def builder_inited(app: Sphinx) -> None:
28
28
extra_args = app .config .apidoc_extra_args
29
29
30
30
if not module_dir :
31
- logger .warning (
32
- "No 'apidoc_module_dir' specified; skipping API doc " "generation"
33
- )
31
+ logger .warning ("No 'apidoc_module_dir' specified; skipping API doc generation" )
34
32
return
35
33
36
34
# if the path is relative, make it relative to the 'conf.py' directory
Original file line number Diff line number Diff line change 1
1
"""
2
- pytest config for sphinxcontrib/apidoc/tests
3
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
+ pytest config for sphinxcontrib/apidoc/tests
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
4
5
- :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
6
- :license: BSD, see LICENSE for details.
5
+ :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
6
+ :license: BSD, see LICENSE for details.
7
7
"""
8
8
9
9
import os
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
"""
3
- test_apidoc
4
- ~~~~~~~~~~~
3
+ test_apidoc
4
+ ~~~~~~~~~~~
5
5
6
- Test the sphinxcontrib.apidoc module.
6
+ Test the sphinxcontrib.apidoc module.
7
7
8
- :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
9
- :license: BSD, see LICENSE for details.
8
+ :copyright: Copyright 2018-present by Stephen Finucane <stephen@that.guru>
9
+ :license: BSD, see LICENSE for details.
10
10
"""
11
11
12
12
import pytest
You can’t perform that action at this time.
0 commit comments