Switch from reorder-python-imports to isort

This commit is contained in:
IamTheFij 2024-05-14 14:14:57 -07:00
parent d639b868a1
commit 7a5bed0454
4 changed files with 11 additions and 4 deletions

View File

@ -14,10 +14,10 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
- id: name-tests-test - id: name-tests-test
exclude: tests/(common.py|util.py|(helpers|integration/factories)/(.+).py) exclude: tests/(common.py|util.py|(helpers|integration/factories)/(.+).py)
- repo: https://github.com/asottile/reorder_python_imports - repo: https://github.com/pycqa/isort
rev: v3.12.0 rev: 5.13.2
hooks: hooks:
- id: reorder-python-imports - id: isort
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0 rev: v1.10.0
hooks: hooks:

View File

@ -13,6 +13,8 @@
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
from __future__ import annotations
project = "release-gitter" project = "release-gitter"
copyright = "2021, iamthefij" copyright = "2021, iamthefij"
author = "iamthefij" author = "iamthefij"

View File

@ -2,6 +2,7 @@
This builder functions as a pseudo builder that instead downloads and installs a binary file using This builder functions as a pseudo builder that instead downloads and installs a binary file using
release-gitter based on a pyproject.toml file. It's a total hack... release-gitter based on a pyproject.toml file. It's a total hack...
""" """
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
@ -16,7 +17,6 @@ from wheel.wheelfile import WheelFile
import release_gitter as rg import release_gitter as rg
from release_gitter import removeprefix from release_gitter import removeprefix
PACKAGE_NAME = "pseudo" PACKAGE_NAME = "pseudo"

View File

@ -62,3 +62,8 @@ dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts] [tool.hatch.envs.lint.scripts]
all = "pre-commit run --all-files" all = "pre-commit run --all-files"
install-hooks = "pre-commit install --install-hooks" install-hooks = "pre-commit install --install-hooks"
[tool.isort]
add_imports = ["from __future__ import annotations"]
force_single_line = true
profile = "black"