From 84f3ee9511a433465438c2551d23ffe3409a5ddf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 23:24:12 +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/pre-commit/pre-commit: v3.3.3 → v3.4.0](https://github.com/pre-commit/pre-commit/compare/v3.3.3...v3.4.0) - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) - [github.com/pre-commit/mirrors-prettier: v3.0.0 → v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.3) - [github.com/PyCQA/pylint: v3.0.0a6 → v3.0.0a7](https://github.com/PyCQA/pylint/compare/v3.0.0a6...v3.0.0a7) - [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0) - [github.com/pre-commit/mirrors-mypy: v1.4.1 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.4.1...v1.5.1) - [github.com/asottile/pyupgrade: v3.9.0 → v3.13.0](https://github.com/asottile/pyupgrade/compare/v3.9.0...v3.13.0) - [github.com/PyCQA/autoflake: v2.2.0 → v2.2.1](https://github.com/PyCQA/autoflake/compare/v2.2.0...v2.2.1) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ebde6a37..7d07cfee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,26 +11,26 @@ repos: - id: trailing-whitespace - id: debug-statements - repo: https://github.com/pre-commit/pre-commit - rev: v3.3.3 + rev: v3.4.0 hooks: - id: validate_manifest - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0 + rev: v3.0.3 hooks: - id: prettier exclude: ^README\.md$ - repo: https://github.com/PyCQA/pylint - rev: v3.0.0a6 + rev: v3.0.0a7 hooks: - id: pylint files: ^(nbqa|tests)/ exclude: ^tests/data/ - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports==1.14.0] @@ -50,13 +50,13 @@ repos: args: [-v, --fail-under=100] files: ^nbqa/ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.5.1 hooks: - id: mypy exclude: ^docs/ additional_dependencies: [types-setuptools, types-toml] - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.13.0 hooks: - id: pyupgrade args: [--py38-plus] @@ -84,7 +84,7 @@ repos: hooks: - id: setup-cfg-fmt - repo: https://github.com/PyCQA/autoflake - rev: v2.2.0 + rev: v2.2.1 hooks: - id: autoflake args: [--remove-all-unused-imports, -i] From 9cef61bdac31aeecdd7dd9ae9834b68b70a222f7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 23:24:39 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .all-contributorsrc | 203 ++++++++++---------------------------------- 1 file changed, 45 insertions(+), 158 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index eff28253..63c4593e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,7 +1,5 @@ { - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": false, "contributors": [ @@ -10,419 +8,308 @@ "name": "Marco Gorelli", "avatar_url": "https://avatars2.githubusercontent.com/u/33491632?v=4", "profile": "https://github.com/MarcoGorelli", - "contributions": [ - "code", - "maintenance", - "review", - "test", - "ideas" - ] + "contributions": ["code", "maintenance", "review", "test", "ideas"] }, { "login": "s-weigand", "name": "Sebastian Weigand", "avatar_url": "https://avatars2.githubusercontent.com/u/9513634?v=4", "profile": "https://github.com/s-weigand", - "contributions": [ - "tool", - "review", - "doc", - "ideas" - ] + "contributions": ["tool", "review", "doc", "ideas"] }, { "login": "girip11", "name": "Girish Pasupathy", "avatar_url": "https://avatars1.githubusercontent.com/u/5471162?v=4", "profile": "https://github.com/girip11", - "contributions": [ - "code", - "infra", - "bug", - "review", - "ideas" - ] + "contributions": ["code", "infra", "bug", "review", "ideas"] }, { "login": "fcatus", "name": "fcatus", "avatar_url": "https://avatars0.githubusercontent.com/u/56323389?v=4", "profile": "https://github.com/fcatus", - "contributions": [ - "infra" - ] + "contributions": ["infra"] }, { "login": "HD23me", "name": "HD23me", "avatar_url": "https://avatars3.githubusercontent.com/u/68745664?v=4", "profile": "https://github.com/HD23me", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "neomatrix369", "name": "mani", "avatar_url": "https://avatars0.githubusercontent.com/u/1570917?v=4", "profile": "https://neomatrix369.wordpress.com/about", - "contributions": [ - "ideas", - "infra" - ] + "contributions": ["ideas", "infra"] }, { "login": "Daniel-Mietchen", "name": "Daniel Mietchen", "avatar_url": "https://avatars3.githubusercontent.com/u/465923?v=4", "profile": "https://orcid.org/0000-0001-9488-1870", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "m3h0w", "name": "Michał Gacka", "avatar_url": "https://avatars1.githubusercontent.com/u/25684390?v=4", "profile": "https://gacka.space/", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "HappyFacade", "name": "Happy", "avatar_url": "https://avatars0.githubusercontent.com/u/54226355?v=4", "profile": "https://github.com/HappyFacade", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "ntaylor-nanigans", "name": "Nat Taylor", "avatar_url": "https://avatars0.githubusercontent.com/u/44039328?v=4", "profile": "https://github.com/ntaylor-nanigans", - "contributions": [ - "ideas", - "code", - "tool", - "bug" - ] + "contributions": ["ideas", "code", "tool", "bug"] }, { "login": "caioariede", "name": "Caio Ariede", "avatar_url": "https://avatars0.githubusercontent.com/u/55533?v=4", "profile": "http://caioariede.github.io/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "sobolevn", "name": "Nikita Sobolev", "avatar_url": "https://avatars1.githubusercontent.com/u/4660275?v=4", "profile": "https://sobolevn.me", - "contributions": [ - "ideas", - "bug", - "doc" - ] + "contributions": ["ideas", "bug", "doc"] }, { "login": "amor71", "name": "Amichay Oren", "avatar_url": "https://avatars1.githubusercontent.com/u/48661380?v=4", "profile": "https://www.linkedin.com/in/amichayoren/", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "pylang", "name": "pylang", "avatar_url": "https://avatars0.githubusercontent.com/u/10778668?v=4", "profile": "https://github.com/pylang", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "henryiii", "name": "Henry Schreiner", "avatar_url": "https://avatars1.githubusercontent.com/u/4616906?v=4", "profile": "http://iscinumpy.gitlab.io", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "charlesdong1991", "name": "Kaiqi Dong", "avatar_url": "https://avatars0.githubusercontent.com/u/9269816?v=4", "profile": "http://www.linkedin.com/in/kaiqidong", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "sbrugman", "name": "Simon Brugman", "avatar_url": "https://avatars2.githubusercontent.com/u/9756388?v=4", "profile": "http://simonbrugman.nl", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "john-sandall", "name": "John Sandall", "avatar_url": "https://avatars2.githubusercontent.com/u/2884159?v=4", "profile": "https://coefficient.ai", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "ncoop57", "name": "Nathan Cooper", "avatar_url": "https://avatars0.githubusercontent.com/u/7613470?v=4", "profile": "http://nathancooper.io", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "agruenberger", "name": "agruenberger", "avatar_url": "https://avatars.githubusercontent.com/u/30429454?v=4", "profile": "https://github.com/agruenberger", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "ravwojdyla", "name": "Rafal Wojdyla", "avatar_url": "https://avatars.githubusercontent.com/u/1419010?v=4", "profile": "https://github.com/ravwojdyla", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "bdice", "name": "Bradley Dice", "avatar_url": "https://avatars.githubusercontent.com/u/3943761?v=4", "profile": "https://bradleydice.com", - "contributions": [ - "ideas", - "code" - ] + "contributions": ["ideas", "code"] }, { "login": "ivanmkc", "name": "Ivan Cheung", "avatar_url": "https://avatars.githubusercontent.com/u/1586049?v=4", "profile": "https://github.com/ivanmkc", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "psychemedia", "name": "Tony Hirst", "avatar_url": "https://avatars.githubusercontent.com/u/82988?v=4", "profile": "http://blog.ouseful.info", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "hukkin", "name": "Taneli Hukkinen", "avatar_url": "https://avatars.githubusercontent.com/u/3275109?v=4", "profile": "https://github.com/hukkin", - "contributions": [ - "maintenance" - ] + "contributions": ["maintenance"] }, { "login": "tcbegley", "name": "Tom Begley", "avatar_url": "https://avatars.githubusercontent.com/u/15220906?v=4", "profile": "http://tcbegley.com", - "contributions": [ - "ideas", - "code", - "doc" - ] + "contributions": ["ideas", "code", "doc"] }, { "login": "sjdemartini", "name": "Steven DeMartini", "avatar_url": "https://avatars.githubusercontent.com/u/1647130?v=4", "profile": "https://stevendemartini.bandcamp.com/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "koaning", "name": "vincent d warmerdam ", "avatar_url": "https://avatars.githubusercontent.com/u/1019791?v=4", "profile": "https://koaning.io", - "contributions": [ - "tutorial" - ] + "contributions": ["tutorial"] }, { "login": "danielsparing", "name": "Daniel Sparing", "avatar_url": "https://avatars.githubusercontent.com/u/2346539?v=4", "profile": "https://github.com/danielsparing", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "asdfCYBER", "name": "asdfCYBER", "avatar_url": "https://avatars.githubusercontent.com/u/33639328?v=4", "profile": "https://github.com/asdfCYBER", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "chrisk314", "name": "Chris Knight", "avatar_url": "https://avatars.githubusercontent.com/u/2366658?v=4", "profile": "https://www.linkedin.com/in/chris-knight-3728a449/", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "LauraRichter", "name": "Laura Richter", "avatar_url": "https://avatars.githubusercontent.com/u/5072669?v=4", "profile": "https://github.com/LauraRichter", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "francesco-ballarin", "name": "Francesco Ballarin", "avatar_url": "https://avatars.githubusercontent.com/u/11783908?v=4", "profile": "http://www.francescoballarin.it", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "janosh", "name": "Janosh Riebesell", "avatar_url": "https://avatars.githubusercontent.com/u/30958850?v=4", "profile": "https://github.com/janosh", - "contributions": [ - "bug", - "doc" - ] + "contributions": ["bug", "doc"] }, { "login": "dnoliver", "name": "Nicolas Oliver", "avatar_url": "https://avatars.githubusercontent.com/u/7730267?v=4", "profile": "https://github.com/dnoliver", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "basnijholt", "name": "Bas Nijholt", "avatar_url": "https://avatars.githubusercontent.com/u/6897215?v=4", "profile": "http://www.nijho.lt", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "rgommers", "name": "Ralf Gommers", "avatar_url": "https://avatars.githubusercontent.com/u/98330?v=4", "profile": "https://github.com/rgommers/", - "contributions": [ - "ideas" - ] + "contributions": ["ideas"] }, { "login": "tovrstra", "name": "Toon Verstraelen", "avatar_url": "https://avatars.githubusercontent.com/u/99431?v=4", "profile": "https://github.com/tovrstra", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "tqa236", "name": "Trinh Quoc Anh", "avatar_url": "https://avatars.githubusercontent.com/u/25203655?v=4", "profile": "https://github.com/tqa236", - "contributions": [ - "bug" - ] + "contributions": ["bug"] }, { "login": "marscher", "name": "Martin K. Scherer", "avatar_url": "https://avatars.githubusercontent.com/u/170287?v=4", "profile": "https://github.com/marscher", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "felix-cw", "name": "Felix Williams", "avatar_url": "https://avatars.githubusercontent.com/u/87987318?v=4", "profile": "https://github.com/felix-cw", - "contributions": [ - "bug", - "infra", - "bug" - ] + "contributions": ["bug", "infra", "bug"] }, { "login": "florianbaer", "name": "Florian Bär", "avatar_url": "https://avatars.githubusercontent.com/u/3041156?v=4", "profile": "http://florianbaer.github.io", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "mikeckennedy", "name": "Michael Kennedy", "avatar_url": "https://avatars.githubusercontent.com/u/2035561?v=4", "profile": "https://mkennedy.codes", - "contributions": [ - "audio" - ] + "contributions": ["audio"] }, { "login": "okken", "name": "Brian Okken", "avatar_url": "https://avatars.githubusercontent.com/u/1568356?v=4", "profile": "https://pythontest.com", - "contributions": [ - "audio" - ] + "contributions": ["audio"] } ], "contributorsPerLine": 7, From 426cdc89f965d98f8443a9b486a9ab0e3b02545f Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:40:50 +0100 Subject: [PATCH 3/3] fixup --- nbqa/replace_source.py | 4 ++-- nbqa/save_code_source.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nbqa/replace_source.py b/nbqa/replace_source.py index db6094b8..186024b7 100644 --- a/nbqa/replace_source.py +++ b/nbqa/replace_source.py @@ -228,7 +228,7 @@ def _write_notebook( jupytext.jupytext.write(notebook_json, temp_notebook, config=config) -def mutate( # pylint: disable=too-many-locals +def mutate( # pylint: disable=too-many-locals,too-many-arguments temp_file: str, notebook: str, notebook_info: NotebookInfo, @@ -331,7 +331,7 @@ def _print_diff(code_cell_number: int, cell_diff: Iterator[str]) -> bool: return False -def diff( +def diff( # pylint: disable=too-many-arguments python_file: str, notebook: str, notebook_info: NotebookInfo, diff --git a/nbqa/save_code_source.py b/nbqa/save_code_source.py index 8cfc67ea..d062a1db 100644 --- a/nbqa/save_code_source.py +++ b/nbqa/save_code_source.py @@ -166,7 +166,7 @@ def _replace_magics( ) -def _parse_cell( +def _parse_cell( # pylint: disable=too-many-arguments source: Sequence[str], whole_src: str, cell_number: int, @@ -335,7 +335,7 @@ def _has_trailing_semicolon(src: str) -> tuple[str, bool]: return tokenize_rt.tokens_to_src(tokens), True -def pre_main( # pylint: disable=R0914 +def pre_main( # pylint: disable=R0914,too-many-arguments notebook_json: MutableMapping[str, Any], file_descriptor: int, process_cells: Sequence[str], @@ -414,7 +414,7 @@ def pre_main( # pylint: disable=R0914 return temporary_lines, code_cells_to_ignore -def main( # pylint: disable=R0914 +def main( # pylint: disable=R0914,too-many-arguments notebook_json: MutableMapping[str, Any], file_name: str, process_cells: Sequence[str],