-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
84 lines (63 loc) · 2.44 KB
/
pyproject.toml
File metadata and controls
84 lines (63 loc) · 2.44 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[tool.poetry]
name = "ni-python-styleguide"
# The a.0 here denotes a source based version
# This is removed when released through the Publish-Package.yml GitHub action
# Official PyPI releases follow Major.Minor.Patch
version = "0.5.0a0"
description = "NI's internal and external Python linter rules and plugins"
authors = ["NI <opensource@ni.com>"]
readme = "README.md" # apply the repo readme to the package as well
repository = "https://github.com/ni/python-styleguide"
license = "MIT"
include = ["ni_python_styleguide/config.toml"]
[tool.poetry.urls]
"Changelog" = "https://github.com/ni/python-styleguide/blob/main/CHANGELOG.md"
[tool.poetry.dependencies]
python = "^3.9"
pathspec = ">=0.11.1"
# Tools we aggregate
flake8 = [
{version = "^5.0", python = ">=3.8,<3.12"},
{version = "^6.1", python = "^3.12"},
]
pycodestyle = [
{version = "^2.9", python = ">=3.8,<3.12"},
{version = "^2.11", python = "^3.12"},
]
black = ">=23.1"
better-diff = "^0.1.3"
# Additional support libraries
# These dependencies were selected because they are already used by black.
click = ">=7.1.2"
toml = ">=0.10.1"
isort = ">=5.10"
# flake8 plugins should be listed here (in alphabetical order)
flake8-black = ">=0.2.1"
flake8-docstrings = ">=1.5.0"
flake8-import-order = ">=0.18.1,<0.19.0" # we're not compatible with 0.19.0 yet due to #226
setuptools = "<82" # flake8-import-order 0.18.x needs pkg_resources which was removed in setuptools v82
flake8-tidy-imports = ">=4.11.0"
pep8-naming = ">=0.11.1"
# Rejected flake8 plugins should be listed here (in alphabetical order)
# Also describe why it is rejected and/or add a link
# flake8-commas: Already handled by flake8-black
# flake8-isort: Already covered by flake8-import-order
# flake8-spellcheck: Project appears to be abandoned as of 2026. No changes in 2 years, open issues from 6-4 years ago.
# hacking: Most rules are either covered by other plugins or would be turned off.
[tool.poetry.group.dev.dependencies]
pytest = ">=6.0.1"
pytest_click = ">=1.0.2"
pytest-snapshot = ">=0.6.3"
[tool.poetry.scripts]
ni-python-styleguide = 'ni_python_styleguide._cli:main'
nps = 'ni_python_styleguide._cli:main'
[tool.black]
line-length = 100
[tool.pytest.ini_options]
addopts = "--doctest-modules"
norecursedirs = "*__snapshots tests/*/input/*"
[tool.ni-python-styleguide]
extend_exclude = "*__snapshots/*/*input.py,tests/*/input/*.py"
[build-system]
requires = ["poetry-core>=1.0,<3.0"]
build-backend = "poetry.core.masonry.api"