1
1
[build-system ]
2
- requires = [" hatchling>1.10" ]
2
+ requires = [" hatchling>= 1.10" ]
3
3
build-backend = " hatchling.build"
4
4
5
5
[project ]
@@ -22,11 +22,11 @@ classifiers = [
22
22
" License :: OSI Approved :: BSD License" ,
23
23
" Programming Language :: Python" ,
24
24
" Programming Language :: Python :: 3" ,
25
- " Programming Language :: Python :: 3.6" ,
26
25
" Programming Language :: Python :: 3.7" ,
27
26
" Programming Language :: Python :: 3.8" ,
28
27
" Programming Language :: Python :: 3.9" ,
29
28
" Programming Language :: Python :: 3.10" ,
29
+ " Programming Language :: Python :: 3.11" ,
30
30
]
31
31
dependencies = [
32
32
" traitlets>=5.3" ,
@@ -36,6 +36,13 @@ dependencies = [
36
36
test = [
37
37
" pytest" ,
38
38
]
39
+ lint = [
40
+ " black>=22.6.0" ,
41
+ " mdformat>0.7" ,
42
+ " mdformat-gfm>=0.3.5" ,
43
+ " ruff>=0.0.156"
44
+ ]
45
+ typing = [" mypy>=0.990" ]
39
46
40
47
[project .urls ]
41
48
Homepage = " https://github.com/ipython/comm"
@@ -48,6 +55,74 @@ include = [
48
55
" /comm" ,
49
56
]
50
57
58
+ [tool .hatch .envs .test ]
59
+ features = [" test" ]
60
+ [tool .hatch .envs .test .scripts ]
61
+ test = " python -m pytest -vv {args}"
62
+ nowarn = " test -W default {args}"
63
+
64
+ [tool .hatch .envs .typing ]
65
+ features = [" typing" , " test" ]
66
+ [tool .hatch .envs .typing .scripts ]
67
+ test = " mypy --install-types --non-interactive {args:comm tests}"
68
+
69
+ [tool .hatch .envs .lint ]
70
+ features = [" lint" ]
71
+ [tool .hatch .envs .lint .scripts ]
72
+ style = [
73
+ " ruff {args:.}" ,
74
+ " black --check --diff {args:.}" ,
75
+ " mdformat --check {args:*.md}"
76
+ ]
77
+ fmt = [
78
+ " black {args:.}" ,
79
+ " ruff --fix {args:.}" ,
80
+ " mdformat {args:*.md}"
81
+ ]
82
+
51
83
[tool .pytest .ini_options ]
52
84
addopts = " -raXs --durations 10 --color=yes"
53
85
filterwarnings = [" error" ]
86
+
87
+ [tool .mypy ]
88
+ check_untyped_defs = true
89
+ disallow_incomplete_defs = true
90
+ disallow_untyped_decorators = true
91
+ no_implicit_optional = true
92
+ no_implicit_reexport = true
93
+ pretty = true
94
+ show_error_context = true
95
+ show_error_codes = true
96
+ strict_equality = true
97
+ strict_optional = true
98
+ warn_unused_configs = true
99
+ warn_redundant_casts = true
100
+ warn_return_any = true
101
+ warn_unused_ignores = true
102
+
103
+ [tool .black ]
104
+ line-length = 100
105
+ skip-string-normalization = true
106
+ target-version = [" py37" ]
107
+
108
+ [tool .ruff ]
109
+ target-version = " py37"
110
+ line-length = 100
111
+ select = [
112
+ " A" , " B" , " C" , " E" , " F" , " FBT" , " I" , " N" , " Q" , " RUF" , " S" , " T" ,
113
+ " UP" , " W" , " YTT" ,
114
+ ]
115
+ ignore = [
116
+ # FBT002 Boolean default value in function definition
117
+ " FBT002" , " FBT003" ,
118
+ ]
119
+ unfixable = [
120
+ # Don't touch print statements
121
+ " T201" ,
122
+ # Don't touch noqa lines
123
+ " RUF100" ,
124
+ ]
125
+
126
+ [tool .ruff .per-file-ignores ]
127
+ # S101 Use of `assert` detected
128
+ "tests/*" = [" S101" ]
0 commit comments