mirror of
https://github.com/thomasasfk/sd-webui-aspect-ratio-helper.git
synced 2026-04-28 18:22:04 +00:00
Update pre-commit config & run pre-commit (#56)
This commit is contained in:
@@ -1,25 +1,35 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.1.0
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 3.9.2
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies:
|
||||
- flake8-bugbear
|
||||
- flake8-quotes
|
||||
- flake8-comprehensions
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: debug-statements
|
||||
- id: double-quote-string-fixer
|
||||
- id: name-tests-test
|
||||
- repo: https://github.com/asottile/reorder_python_imports
|
||||
rev: v3.9.0
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
args: [--py37-plus, --add-import, "from __future__ import annotations"]
|
||||
- repo: https://github.com/asottile/add-trailing-comma
|
||||
rev: v2.4.0
|
||||
hooks:
|
||||
- id: add-trailing-comma
|
||||
args: [--py36-plus]
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.3.2
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py37-plus]
|
||||
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||
rev: v2.0.2
|
||||
hooks:
|
||||
- id: autopep8
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 6.0.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
args:
|
||||
- --max-line-length=120
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC
|
||||
from abc import abstractmethod
|
||||
from functools import partial
|
||||
@@ -125,7 +127,7 @@ class PredefinedAspectRatioButtons(ArhUIComponent):
|
||||
elem_classes='arh-btn-row',
|
||||
):
|
||||
for ar_str in aspect_ratios:
|
||||
w, h, *_ = [abs(float(d)) for d in ar_str.split(':')]
|
||||
w, h, *_ = (abs(float(d)) for d in ar_str.split(':'))
|
||||
|
||||
inputs = []
|
||||
if use_max_dim_op:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from __future__ import annotations
|
||||
EXTENSION_NAME = 'Aspect Ratio Helper'
|
||||
|
||||
MAX_DIMENSION = 2048
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import itertools
|
||||
|
||||
import gradio as gr
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
|
||||
import aspect_ratio_helper._constants as _const
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import gradio as gr
|
||||
from modules import script_callbacks
|
||||
from modules import scripts
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from aspect_ratio_helper.main import AspectRatioStepScript
|
||||
|
||||
__all__ = ['AspectRatioStepScript']
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
import aspect_ratio_helper._constants as _constants
|
||||
|
||||
Reference in New Issue
Block a user