From 61bd2b939a964d5c33af1feaa0f2cc3410894e2d Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:48:23 +0000 Subject: [PATCH] [repo-helper] Configuration Update (#158) * Updated files with 'repo_helper'. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- doc-source/conf.py | 6 ++++++ formate.toml | 16 ++++++++-------- pyproject.toml | 35 ++++++++++++++++------------------- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ba6847..f2e09cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.9.1 + rev: v0.11.0 hooks: - id: reformat-pyproject diff --git a/doc-source/conf.py b/doc-source/conf.py index c05ec1b..9fe7c04 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -73,8 +73,14 @@ def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout + from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) + app.connect("build-finished", sphinxemoji.copy_asset_files) + app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") + app.add_js_file("twemoji.js") + app.add_css_file("twemoji.css") + app.add_transform(sphinxemoji.EmojiSubstitutions) html_logo = "../sphinx_toolbox.png" diff --git a/formate.toml b/formate.toml index ce142b9..e1bcc52 100644 --- a/formate.toml +++ b/formate.toml @@ -6,21 +6,17 @@ noqa-reformat = 60 ellipsis-reformat = 70 squish_stubs = 80 -[config] -indent = "\t" -line_length = 115 - [hooks.yapf] priority = 30 -[hooks.isort] -priority = 50 - [hooks.yapf.kwargs] yapf_style = ".style.yapf" +[hooks.isort] +priority = 50 + [hooks.isort.kwargs] -indent = "\t\t" +indent = " " multi_line_output = 8 import_heading_stdlib = "stdlib" import_heading_thirdparty = "3rd party" @@ -79,3 +75,7 @@ known_third_party = [ "typing_inspect", ] known_first_party = [ "sphinx_toolbox",] + +[config] +indent = " " +line_length = 115 diff --git a/pyproject.toml b/pyproject.toml index 6b931b3..b21c5a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,14 +10,13 @@ readme = "README.rst" keywords = [ "documentation", "sphinx", "sphinx-extension",] dynamic = [ "requires-python", "classifiers", "dependencies",] +[project.license] +file = "LICENSE" + [[project.authors]] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" - -[project.license] -file = "LICENSE" - [project.urls] Homepage = "https://github.com/sphinx-toolbox/sphinx-toolbox" "Issue Tracker" = "https://github.com/sphinx-toolbox/sphinx-toolbox/issues" @@ -50,6 +49,10 @@ package = "sphinx_toolbox" allowed_unused = [ "html5lib", "sphinx_prompt", "sphinx_tabs", "filelock", "cachecontrol", "sphinx_jinja2_compat",] namespace_packages = [ "ruamel.yaml",] +[tool.dep_checker.name_mapping] +beautifulsoup4 = "bs4" +ruamel-yaml = "ruamel.yaml" + [tool.mkrecipe] conda-channels = [ "conda-forge", "domdfcoding",] extras = "all" @@ -75,7 +78,6 @@ extensions = [ "sphinx.ext.mathjax", "sphinxcontrib.extras_require", "sphinx.ext.todo", - "sphinxemoji.sphinxemoji", "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", @@ -93,7 +95,6 @@ extensions = [ "sphinx_toolbox.latex.succinct_seealso", "sphinx_toolbox.more_autosummary.column_widths", ] -sphinxemoji_style = "twemoji" gitstamp_fmt = "%d %b %Y" templates_path = [ "_templates",] html_static_path = [ "_static",] @@ -155,9 +156,15 @@ show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] -[tool.dep_checker.name_mapping] -beautifulsoup4 = "bs4" -ruamel-yaml = "ruamel.yaml" +[tool.snippet-fmt.languages.python] +reformat = true + +[tool.snippet-fmt.languages.TOML] +reformat = true + +[tool.snippet-fmt.languages.ini] + +[tool.snippet-fmt.languages.json] [tool.dependency-dash."requirements.txt"] order = 10 @@ -169,13 +176,3 @@ include = false [tool.dependency-dash."doc-source/requirements.txt"] order = 30 include = false - -[tool.snippet-fmt.languages.python] -reformat = true - -[tool.snippet-fmt.languages.TOML] -reformat = true - -[tool.snippet-fmt.languages.ini] - -[tool.snippet-fmt.languages.json]