Skip to content

Commit

Permalink
More pyproject.toml updates
Browse files Browse the repository at this point in the history
- enable TOML reformatting in prettier
- move bandit config to pyproject.toml
  • Loading branch information
ssbarnea committed Dec 11, 2022
1 parent 5e4e0e4 commit 94198be
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .bandit

This file was deleted.

7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@ repos:
rev: 1.7.4
hooks:
- id: bandit
args: [--ini, .bandit]
args: [-c, pyproject.toml]
exclude: ^tests/
additional_dependencies:
- "toml"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
additional_dependencies:
- "prettier"
- "prettier-plugin-toml"
52 changes: 24 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ classifiers = [
]
keywords = ["pip", "requirements", "packaging"]
dependencies = [
# direct dependencies
"build",
"click >= 8",
"pip >= 22.2",
# indirect dependencies
"setuptools", # typically needed when pip-tools invokes setup.py
"wheel", # pip plugin needed by pip-tools
# direct dependencies
"build",
"click >= 8",
"pip >= 22.2",
# indirect dependencies
"setuptools", # typically needed when pip-tools invokes setup.py
"wheel", # pip plugin needed by pip-tools

]

[project.urls]
Expand All @@ -53,21 +54,23 @@ changelog = "https://github.com/jazzband/pip-tools/releases"

[project.optional-dependencies]
testing = [
"pytest >= 7.2.0",
"pytest-rerunfailures",
"pytest-xdist",
# build deps for tests
"flit_core >=2,<4",
"poetry_core>=1.0.0",
]
coverage = [
"pytest-cov",
"pytest >= 7.2.0",
"pytest-rerunfailures",
"pytest-xdist",
# build deps for tests
"flit_core >=2,<4",
"poetry_core>=1.0.0",
]
coverage = ["pytest-cov"]

[project.scripts]
pip-compile = "piptools.scripts.compile:cli"
pip-sync = "piptools.scripts.sync:cli"

[tool.bandit]
exclude_dirs = ["tests", ".tox", ".eggs", ".venv", ".git"]
skips = ["B101"]

[tool.isort]
profile = "black"
add_imports = "from __future__ import annotations"
Expand All @@ -87,30 +90,23 @@ warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true

# Avoid error: Duplicate module named 'setup'
# https://github.com/python/mypy/issues/4008
exclude = "^tests/test_data/"

[tool.mypy.overrides]
modules = [
"tests.*"
]
modules = ["tests.*"]
disallow_untyped_defs = false

[tool.pytest.ini_options]
addopts = [
# `pytest-xdist`:
"--numprocesses=auto"
# `pytest-xdist`:
"--numprocesses=auto"
]
norecursedirs = ".* build dist venv test_data piptools/_compat/*"
testpaths = "tests piptools"
filterwarnings = [
"always"
]
markers = [
"network: mark tests that require internet access"
]
filterwarnings = ["always"]
markers = ["network: mark tests that require internet access"]

[tool.setuptools.packages.find]
# needed only because we did not adopt src layout yet
Expand Down

0 comments on commit 94198be

Please sign in to comment.