From 57f1e74c87ed8427cdad1e74f1ad78b8d7661957 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 06:47:06 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 148 ++++++++++++++++---------------- .readthedocs.yaml | 22 ++--- src/simple_scvi/_mymodel.py | 8 +- src/simple_scvi/_mypyromodel.py | 8 +- 4 files changed, 89 insertions(+), 97 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b76182..98cc460 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,79 +1,79 @@ fail_fast: false default_language_version: - python: python3 + python: python3 default_stages: - - commit - - push + - commit + - push minimum_pre_commit_version: 2.16.0 repos: - - repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.6 - hooks: - - id: prettier - - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 - hooks: - - id: blacken-docs - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - - repo: https://github.com/asottile/yesqa - rev: v1.4.0 - hooks: - - id: yesqa - additional_dependencies: - - flake8-tidy-imports - - flake8-docstrings - - flake8-rst-docstrings - - flake8-comprehensions - - flake8-bugbear - - flake8-blind-except - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: detect-private-key - - id: check-ast - - id: end-of-file-fixer - - id: mixed-line-ending - args: [--fix=lf] - - id: trailing-whitespace - - id: check-case-conflict - - repo: https://github.com/PyCQA/autoflake - rev: v2.0.2 - hooks: - - id: autoflake - args: - - --in-place - - --remove-all-unused-imports - - --remove-unused-variable - - --ignore-init-module-imports - - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - additional_dependencies: - - flake8-tidy-imports - - flake8-docstrings - - flake8-rst-docstrings - - flake8-comprehensions - - flake8-bugbear - - flake8-blind-except - - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 - hooks: - - id: pyupgrade - args: [--py3-plus, --py38-plus, --keep-runtime-typing] - - repo: local - hooks: - - id: forbid-to-commit - name: Don't commit rej files - entry: | - Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates. - Fix the merge conflicts manually and remove the .rej files. - language: fail - files: '.*\.rej$' + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0-alpha.6 + hooks: + - id: prettier + - repo: https://github.com/asottile/blacken-docs + rev: 1.13.0 + hooks: + - id: blacken-docs + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort + - repo: https://github.com/asottile/yesqa + rev: v1.4.0 + hooks: + - id: yesqa + additional_dependencies: + - flake8-tidy-imports + - flake8-docstrings + - flake8-rst-docstrings + - flake8-comprehensions + - flake8-bugbear + - flake8-blind-except + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: detect-private-key + - id: check-ast + - id: end-of-file-fixer + - id: mixed-line-ending + args: [--fix=lf] + - id: trailing-whitespace + - id: check-case-conflict + - repo: https://github.com/PyCQA/autoflake + rev: v2.0.2 + hooks: + - id: autoflake + args: + - --in-place + - --remove-all-unused-imports + - --remove-unused-variable + - --ignore-init-module-imports + - repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + additional_dependencies: + - flake8-tidy-imports + - flake8-docstrings + - flake8-rst-docstrings + - flake8-comprehensions + - flake8-bugbear + - flake8-blind-except + - repo: https://github.com/asottile/pyupgrade + rev: v3.3.1 + hooks: + - id: pyupgrade + args: [--py3-plus, --py38-plus, --keep-runtime-typing] + - repo: local + hooks: + - id: forbid-to-commit + name: Don't commit rej files + entry: | + Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates. + Fix the merge conflicts manually and remove the .rej files. + language: fail + files: '.*\.rej$' diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1bf3915..23a5340 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,16 +1,16 @@ # https://docs.readthedocs.io/en/stable/config-file/v2.html version: 2 build: - os: ubuntu-20.04 - tools: - python: "3.10" + os: ubuntu-20.04 + tools: + python: "3.10" sphinx: - configuration: docs/conf.py - # disable this for more lenient docs builds - fail_on_warning: false + configuration: docs/conf.py + # disable this for more lenient docs builds + fail_on_warning: false python: - install: - - method: pip - path: . - extra_requirements: - - doc + install: + - method: pip + path: . + extra_requirements: + - doc diff --git a/src/simple_scvi/_mymodel.py b/src/simple_scvi/_mymodel.py index 69cc50d..c77374a 100644 --- a/src/simple_scvi/_mymodel.py +++ b/src/simple_scvi/_mymodel.py @@ -4,12 +4,8 @@ from anndata import AnnData from scvi import REGISTRY_KEYS from scvi.data import AnnDataManager -from scvi.data.fields import ( - CategoricalJointObsField, - CategoricalObsField, - LayerField, - NumericalJointObsField, -) +from scvi.data.fields import (CategoricalJointObsField, CategoricalObsField, + LayerField, NumericalJointObsField) from scvi.model._utils import _init_library_size from scvi.model.base import BaseModelClass, UnsupervisedTrainingMixin, VAEMixin from scvi.utils import setup_anndata_dsp diff --git a/src/simple_scvi/_mypyromodel.py b/src/simple_scvi/_mypyromodel.py index 104483f..01340cb 100644 --- a/src/simple_scvi/_mypyromodel.py +++ b/src/simple_scvi/_mypyromodel.py @@ -6,12 +6,8 @@ from anndata import AnnData from scvi import REGISTRY_KEYS from scvi.data import AnnDataManager -from scvi.data.fields import ( - CategoricalJointObsField, - CategoricalObsField, - LayerField, - NumericalJointObsField, -) +from scvi.data.fields import (CategoricalJointObsField, CategoricalObsField, + LayerField, NumericalJointObsField) from scvi.dataloaders import DataSplitter from scvi.model.base import BaseModelClass from scvi.train import PyroTrainingPlan, TrainRunner