-
Notifications
You must be signed in to change notification settings - Fork 24
/
pants.toml
57 lines (47 loc) · 2.02 KB
/
pants.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 2021 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
[GLOBAL]
pants_version = "2.23.0"
backend_packages.add = [
'pants.backend.python',
'pants.backend.python.lint.docformatter',
'pants.backend.python.lint.black',
'pants.backend.python.lint.flake8',
'pants.backend.python.lint.isort',
'pants.backend.python.typecheck.mypy',
]
[anonymous-telemetry]
enabled = true
repo_id = "37798A99-096B-4B79-8D0F-30D4D1A1ECD1"
[source]
# The Python source root is the repo root. See https://www.pantsbuild.org/docs/source-roots.
root_patterns = ["/"]
[python]
# The default interpreter compatibility for code in this repo. Individual targets can override
# this with the `compatibility` field. See
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.
interpreter_constraints = [">=3.9,<3.10"]
# Use a lockfile. See https://www.pantsbuild.org/docs/python-third-party-dependencies.
enable_resolves = true
resolves = { python-default = "lockfiles/python-default.lock" }
[python-bootstrap]
# We search for interpreters on both on the $PATH and in the `$(pyenv root)/versions` folder.
# Note the gotcha that the order of entries does not matter in this option, as Pants will consider
# all interpreters it finds and select a compatible one.
# So, if you're using macOS, you may want to leave off the <PATH> entry to avoid using the
# problematic system Pythons. See
# https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path.
search_path = ["<PATH>", "<PYENV>"]
[python-infer]
# Infer dependencies from strings that look like module/class names, such as are often
# found in settings.py, where dependencies are enumerated as strings and not directly imported.
string_imports = true
use_rust_parser = true
[pytest]
install_from_resolve = "python-default"
requirements = ["pytest-django"]
execution_slot_var = "PANTS_EXECUTION_SLOT"
[mypy]
install_from_resolve = "python-default"
requirements = ["django-stubs"]
interpreter_constraints = [">=3.9,<3.10"]