Add isort to linting toolchain

Co-authored-by: Shivansh-007 <shivansh-007@outlook.com>
This commit is contained in:
Richard Si 2022-07-26 21:32:31 -04:00
parent e9e756da7a
commit e0a780a505
2 changed files with 14 additions and 1 deletions

View File

@ -23,6 +23,11 @@ repos:
files: '(CHANGES\.md|the_basics\.md)$' files: '(CHANGES\.md|the_basics\.md)$'
additional_dependencies: *version_check_dependencies additional_dependencies: *version_check_dependencies
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8 - repo: https://github.com/pycqa/flake8
rev: 4.0.1 rev: 4.0.1
hooks: hooks:

View File

@ -22,13 +22,21 @@ extend-exclude = '''
# this off. # this off.
preview = true preview = true
# Build system information below. # Build system information and other project-specific configuration below.
# NOTE: You don't need this in your own Black configuration. # NOTE: You don't need this in your own Black configuration.
[build-system] [build-system]
requires = ["setuptools>=45.0", "setuptools_scm[toml]>=6.3.1", "wheel"] requires = ["setuptools>=45.0", "setuptools_scm[toml]>=6.3.1", "wheel"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[tool.isort]
atomic = true
profile = "black"
line_length = 88
skip_gitignore = true
skip_glob = ["src/blib2to3", "tests/data", "profiling"]
known_first_party = ["black", "blib2to3", "blackd", "_black_version"]
[tool.pytest.ini_options] [tool.pytest.ini_options]
# Option below requires `tests/optional.py` # Option below requires `tests/optional.py`
addopts = "--strict-config --strict-markers" addopts = "--strict-config --strict-markers"