From 8a6b4322c8f1945ed9e956aebe829c138d052b4d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 00:36:56 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0) - [github.com/pre-commit/mirrors-mypy: v0.981 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.981...v0.982) - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.0 → v3.0.0-alpha.1](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.0...v3.0.0-alpha.1) - [github.com/asottile/pyupgrade: v2.38.2 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v2.38.2...v3.1.0) - [github.com/pre-commit/mirrors-eslint: v8.24.0 → v8.25.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.24.0...v8.25.0) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 802fc4a3..fefc20d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 22.10.0 hooks: - id: black args: ["--line-length", "100"] @@ -38,7 +38,7 @@ repos: args: [--profile=black] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.981 + rev: v0.982 hooks: - id: mypy args: ["--config-file", "pyproject.toml"] @@ -47,12 +47,12 @@ repos: stages: [manual] - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.0 + rev: v3.0.0-alpha.1 hooks: - id: prettier - repo: https://github.com/asottile/pyupgrade - rev: v2.38.2 + rev: v3.1.0 hooks: - id: pyupgrade args: [--py37-plus] @@ -73,7 +73,7 @@ repos: stages: [manual] - repo: https://github.com/pre-commit/mirrors-eslint - rev: v8.24.0 + rev: v8.25.0 hooks: - id: eslint stages: [manual] From 6e49343fe4e569410272ecb20139b327dbf130da Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Oct 2022 19:40:28 -0500 Subject: [PATCH 2/3] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fefc20d2..661b5e14 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,10 +46,16 @@ repos: additional_dependencies: [pytest, types-docutils, sphinx] stages: [manual] - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.1 + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.10.1 hooks: - - id: prettier + - id: validate-pyproject + stages: [manual] + + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.16 + hooks: + - id: mdformat - repo: https://github.com/asottile/pyupgrade rev: v3.1.0 From 9fd01cc7b279a46e58fddc3c29149e73c7d67ab1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 00:40:40 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- COPYING.md | 6 ++++-- README.md | 10 +++++++--- docs/readme-docs.md | 42 +++++++++++++++++++++++++++++------------- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/COPYING.md b/COPYING.md index 861df385..b4325343 100644 --- a/COPYING.md +++ b/COPYING.md @@ -58,5 +58,7 @@ change to one of the IPython repositories. With this in mind, the following banner should be used in any source code file to indicate the copyright and license terms: - # Copyright (c) IPython Development Team. - # Distributed under the terms of the Modified BSD License. +``` +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. +``` diff --git a/README.md b/README.md index bd1c0ac0..ef7e6c42 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,16 @@ the pre-commit hook should take care of how it should look. To install `pre-commit` locally, run the following:: - pip install pre-commit - pre-commit install +``` +pip install pre-commit +pre-commit install +``` You can invoke the pre-commit hook by hand at any time with:: - pre-commit run +``` +pre-commit run +``` which should run any autoformatting on your code and tell you about any errors it couldn't fix automatically. diff --git a/docs/readme-docs.md b/docs/readme-docs.md index 7f2ce0f0..54e5602d 100644 --- a/docs/readme-docs.md +++ b/docs/readme-docs.md @@ -7,39 +7,53 @@ is hosted on ReadTheDocs. #### Change directory to documentation root: - cd docs +``` +cd docs +``` #### Create environment -- [**conda**] Create conda env (and install relevant dependencies): +- \[**conda**\] Create conda env (and install relevant dependencies): - conda env create -f environment.yml + ``` + conda env create -f environment.yml + ``` -- [**pip**] Create virtual environment (and install relevant dependencies): +- \[**pip**\] Create virtual environment (and install relevant dependencies): - virtualenv traitlets_docs -p python3 - pip install -r requirements.txt + ``` + virtualenv traitlets_docs -p python3 + pip install -r requirements.txt + ``` #### Activate the newly built environment `traitlets_docs` -- [**conda**] Activate conda env: +- \[**conda**\] Activate conda env: - source activate traitlets_docs + ``` + source activate traitlets_docs + ``` -- [**pip**] The virtualenv should have been automatically activated. If +- \[**pip**\] The virtualenv should have been automatically activated. If not: - source activate + ``` + source activate + ``` #### Build documentation using: - Makefile for Linux and OS X: - make html + ``` + make html + ``` - make.bat for Windows: - make.bat html + ``` + make.bat html + ``` #### Display the documentation locally @@ -48,7 +62,9 @@ is hosted on ReadTheDocs. - Or alternatively you may run a local server to display the docs. In Python 3: - python -m http.server 8000 + ``` + python -m http.server 8000 + ``` In your browser, go to `http://localhost:8000`.