duty 1.6.0__py3-none-any.whl → 1.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. duty/__init__.py +49 -2
  2. duty/__main__.py +1 -1
  3. duty/_internal/__init__.py +0 -0
  4. duty/_internal/callables/__init__.py +34 -0
  5. duty/{callables → _internal/callables}/_io.py +2 -0
  6. duty/_internal/callables/autoflake.py +132 -0
  7. duty/_internal/callables/black.py +176 -0
  8. duty/_internal/callables/blacken_docs.py +92 -0
  9. duty/_internal/callables/build.py +76 -0
  10. duty/_internal/callables/coverage.py +716 -0
  11. duty/_internal/callables/flake8.py +222 -0
  12. duty/_internal/callables/git_changelog.py +178 -0
  13. duty/_internal/callables/griffe.py +227 -0
  14. duty/_internal/callables/interrogate.py +152 -0
  15. duty/_internal/callables/isort.py +573 -0
  16. duty/_internal/callables/mkdocs.py +256 -0
  17. duty/_internal/callables/mypy.py +496 -0
  18. duty/_internal/callables/pytest.py +475 -0
  19. duty/_internal/callables/ruff.py +399 -0
  20. duty/_internal/callables/safety.py +82 -0
  21. duty/_internal/callables/ssort.py +38 -0
  22. duty/_internal/callables/twine.py +284 -0
  23. duty/_internal/cli.py +322 -0
  24. duty/_internal/collection.py +246 -0
  25. duty/_internal/context.py +111 -0
  26. duty/{debug.py → _internal/debug.py} +13 -15
  27. duty/_internal/decorator.py +111 -0
  28. duty/_internal/exceptions.py +12 -0
  29. duty/_internal/tools/__init__.py +41 -0
  30. duty/{tools → _internal/tools}/_autoflake.py +8 -4
  31. duty/{tools → _internal/tools}/_base.py +15 -2
  32. duty/{tools → _internal/tools}/_black.py +5 -5
  33. duty/{tools → _internal/tools}/_blacken_docs.py +10 -5
  34. duty/{tools → _internal/tools}/_build.py +4 -4
  35. duty/{tools → _internal/tools}/_coverage.py +8 -4
  36. duty/{tools → _internal/tools}/_flake8.py +10 -12
  37. duty/{tools → _internal/tools}/_git_changelog.py +8 -4
  38. duty/{tools → _internal/tools}/_griffe.py +8 -4
  39. duty/{tools → _internal/tools}/_interrogate.py +4 -4
  40. duty/{tools → _internal/tools}/_isort.py +8 -6
  41. duty/{tools → _internal/tools}/_mkdocs.py +8 -4
  42. duty/{tools → _internal/tools}/_mypy.py +5 -5
  43. duty/{tools → _internal/tools}/_pytest.py +8 -4
  44. duty/{tools → _internal/tools}/_ruff.py +11 -5
  45. duty/{tools → _internal/tools}/_safety.py +13 -8
  46. duty/{tools → _internal/tools}/_ssort.py +10 -6
  47. duty/{tools → _internal/tools}/_twine.py +11 -5
  48. duty/_internal/tools/_yore.py +96 -0
  49. duty/_internal/validation.py +266 -0
  50. duty/callables/__init__.py +4 -4
  51. duty/callables/autoflake.py +11 -126
  52. duty/callables/black.py +12 -171
  53. duty/callables/blacken_docs.py +11 -86
  54. duty/callables/build.py +12 -71
  55. duty/callables/coverage.py +12 -711
  56. duty/callables/flake8.py +12 -217
  57. duty/callables/git_changelog.py +12 -173
  58. duty/callables/griffe.py +12 -222
  59. duty/callables/interrogate.py +12 -147
  60. duty/callables/isort.py +12 -568
  61. duty/callables/mkdocs.py +12 -251
  62. duty/callables/mypy.py +11 -490
  63. duty/callables/pytest.py +12 -470
  64. duty/callables/ruff.py +12 -394
  65. duty/callables/safety.py +11 -76
  66. duty/callables/ssort.py +12 -33
  67. duty/callables/twine.py +12 -279
  68. duty/cli.py +10 -316
  69. duty/collection.py +12 -228
  70. duty/context.py +12 -107
  71. duty/decorator.py +12 -108
  72. duty/exceptions.py +13 -10
  73. duty/tools.py +63 -0
  74. duty/validation.py +12 -262
  75. {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/METADATA +4 -3
  76. duty-1.6.1.dist-info/RECORD +81 -0
  77. {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/WHEEL +1 -1
  78. {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/entry_points.txt +1 -1
  79. duty/tools/__init__.py +0 -50
  80. duty/tools/_yore.py +0 -54
  81. duty-1.6.0.dist-info/RECORD +0 -55
  82. {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/licenses/LICENSE +0 -0
duty/callables/mypy.py CHANGED
@@ -1,496 +1,17 @@
1
- """Callable for [Mypy](https://github.com/python/mypy)."""
1
+ """Deprecated. Use [`duty.tools.mypy`][] instead."""
2
2
 
3
- from __future__ import annotations
3
+ # YORE: Bump 2: Remove file.
4
4
 
5
- from typing import Literal
5
+ import warnings
6
+ from typing import Any
6
7
 
7
- from failprint.lazy import lazy
8
+ from duty._internal.callables import mypy as _mypy
8
9
 
9
- from duty.callables._io import _LazyStderr, _LazyStdout
10
10
 
11
-
12
- @lazy(name="mypy")
13
- def run(
14
- *paths: str,
15
- config_file: str | None = None,
16
- enable_incomplete_feature: bool | None = None,
17
- verbose: bool | None = None,
18
- warn_unused_configs: bool | None = None,
19
- no_namespace_packages: bool | None = None,
20
- ignore_missing_imports: bool | None = None,
21
- follow_imports: Literal["normal", "silent", "skip", "error"] | None = None,
22
- python_executable: str | None = None,
23
- no_site_packages: bool | None = None,
24
- no_silence_site_packages: bool | None = None,
25
- python_version: str | None = None,
26
- py2: bool | None = None,
27
- platform: str | None = None,
28
- always_true: list[str] | None = None,
29
- always_false: list[str] | None = None,
30
- disallow_any_unimported: bool | None = None,
31
- disallow_any_expr: bool | None = None,
32
- disallow_any_decorated: bool | None = None,
33
- disallow_any_explicit: bool | None = None,
34
- disallow_any_generics: bool | None = None,
35
- disallow_subclassing_any: bool | None = None,
36
- disallow_untyped_calls: bool | None = None,
37
- disallow_untyped_defs: bool | None = None,
38
- disallow_incomplete_defs: bool | None = None,
39
- check_untyped_defs: bool | None = None,
40
- disallow_untyped_decorators: bool | None = None,
41
- implicit_optional: bool | None = None,
42
- no_strict_optional: bool | None = None,
43
- warn_redundant_casts: bool | None = None,
44
- warn_unused_ignores: bool | None = None,
45
- no_warn_no_return: bool | None = None,
46
- warn_return_any: bool | None = None,
47
- warn_unreachable: bool | None = None,
48
- allow_untyped_globals: bool | None = None,
49
- allow_redefinition: bool | None = None,
50
- no_implicit_reexport: bool | None = None,
51
- strict_equality: bool | None = None,
52
- strict_concatenate: bool | None = None,
53
- strict: bool | None = None,
54
- disable_error_code: str | None = None,
55
- enable_error_code: str | None = None,
56
- show_error_context: bool | None = None,
57
- show_column_numbers: bool | None = None,
58
- show_error_end: bool | None = None,
59
- hide_error_codes: bool | None = None,
60
- pretty: bool | None = None,
61
- no_color_output: bool | None = None,
62
- no_error_summary: bool | None = None,
63
- show_absolute_path: bool | None = None,
64
- no_incremental: bool | None = None,
65
- cache_dir: str | None = None,
66
- sqlite_cache: bool | None = None,
67
- cache_fine_grained: bool | None = None,
68
- skip_version_check: bool | None = None,
69
- skip_cache_mtime_checks: bool | None = None,
70
- pdb: bool | None = None,
71
- show_traceback: bool | None = None,
72
- raise_exceptions: bool | None = None,
73
- custom_typing_module: str | None = None,
74
- disable_recursive_aliases: bool | None = None,
75
- custom_typeshed_dir: str | None = None,
76
- warn_incomplete_stub: bool | None = None,
77
- shadow_file: tuple[str, str] | None = None,
78
- any_exprs_report: str | None = None,
79
- cobertura_xml_report: str | None = None,
80
- html_report: str | None = None,
81
- linecount_report: str | None = None,
82
- linecoverage_report: str | None = None,
83
- lineprecision_report: str | None = None,
84
- txt_report: str | None = None,
85
- xml_report: str | None = None,
86
- xslt_html_report: str | None = None,
87
- xslt_txt_report: str | None = None,
88
- junit_xml: str | None = None,
89
- find_occurrences: str | None = None,
90
- scripts_are_modules: bool | None = None,
91
- install_types: bool | None = None,
92
- non_interactive: bool | None = None,
93
- explicit_package_bases: bool | None = None,
94
- exclude: str | None = None,
95
- module: str | None = None,
96
- package: str | None = None,
97
- command: str | None = None,
98
- ) -> None:
99
- """Run mypy.
100
-
101
- Parameters:
102
- *paths: Path to scan.
103
- config_file: Configuration file, must have a [mypy] section (defaults to mypy.ini, .mypy.ini,
104
- enable_incomplete_feature: Enable support of incomplete/experimental features for early preview.
105
- verbose: More verbose messages.
106
- pyproject.toml, setup.cfg, /home/pawamoy/.config/mypy/config, ~/.config/mypy/config, ~/.mypy.ini).
107
- warn_unused_configs: Warn about unused '[mypy-<pattern>]' or '[[tool.mypy.overrides]]' config sections
108
- (inverse: --no-warn-unused-configs).
109
- no_namespace_packages: Support namespace packages (PEP 420, __init__.py-less) (inverse: --namespace-packages).
110
- ignore_missing_imports: Silently ignore imports of missing modules.
111
- follow_imports: How to treat imports (default normal).
112
- python_executable: Python executable used for finding PEP 561 compliant installed packages and stubs.
113
- no_site_packages: Do not search for installed PEP 561 compliant packages.
114
- no_silence_site_packages: Do not silence errors in PEP 561 compliant installed packages.
115
- python_version: Type check code assuming it will be running on Python x.y.
116
- py2: Use Python 2 mode (same as --python-version 2.7).
117
- platform: Type check special-cased code for the given OS platform (defaults to sys.platform).
118
- always_true: Additional variable to be considered True (may be repeated).
119
- always_false: Additional variable to be considered False (may be repeated).
120
- disallow_any_unimported: Disallow Any types resulting from unfollowed imports.
121
- disallow_any_expr: Disallow all expressions that have type Any.
122
- disallow_any_decorated: Disallow functions that have Any in their signature after decorator transformation.
123
- disallow_any_explicit: Disallow explicit Any in type positions.
124
- disallow_any_generics: Disallow usage of generic types that do not specify explicit type parameters
125
- (inverse: --allow-any-generics).
126
- disallow_subclassing_any: Disallow subclassing values of type 'Any' when defining classes
127
- (inverse: --allow-subclassing-any).
128
- disallow_untyped_calls: Disallow calling functions without type annotations from functions with type annotations
129
- (inverse: --allow-untyped-calls).
130
- disallow_untyped_defs: Disallow defining functions without type annotations or with incomplete type annotations
131
- (inverse: --allow-untyped-defs).
132
- disallow_incomplete_defs: Disallow defining functions with incomplete type annotations
133
- (inverse: --allow-incomplete-defs).
134
- check_untyped_defs: Type check the interior of functions without type annotations
135
- (inverse: --no-check-untyped-defs).
136
- disallow_untyped_decorators: Disallow decorating typed functions with untyped decorators
137
- (inverse: --allow-untyped-decorators).
138
- implicit_optional: Assume arguments with default values of None are Optional(inverse: --no-implicit-optional).
139
- no_strict_optional: Disable strict Optional checks (inverse: --strict-optional).
140
- warn_redundant_casts: Warn about casting an expression to its inferred type (inverse: --no-warn-redundant-casts).
141
- warn_unused_ignores: Warn about unneeded '# type: ignore' comments (inverse: --no-warn-unused-ignores).
142
- no_warn_no_return: Do not warn about functions that end without returning (inverse: --warn-no-return).
143
- warn_return_any: Warn about returning values of type Any from non-Any typed functions (inverse: --no-warn-return-any).
144
- warn_unreachable: Warn about statements or expressions inferred to be unreachable (inverse: --no-warn-unreachable).
145
- allow_untyped_globals: Suppress toplevel errors caused by missing annotations (inverse: --disallow-untyped-globals).
146
- allow_redefinition: Allow unconditional variable redefinition with a new type (inverse: --disallow-redefinition).
147
- no_implicit_reexport: Treat imports as private unless aliased (inverse: --implicit-reexport).
148
- strict_equality: Prohibit equality, identity, and container checks for non-overlapping types
149
- (inverse: --no-strict-equality).
150
- strict_concatenate: Make arguments prepended via Concatenate be truly positional-only (inverse: --no-strict-concatenate).
151
- strict: Strict mode; enables the following flags: --warn-unused-configs, --disallow-any-generics,
152
- --disallow-subclassing-any, --disallow-untyped-calls, --disallow-untyped-defs, --disallow-incomplete-defs,
153
- --check-untyped-defs, --disallow-untyped-decorators, --warn-redundant-casts, --warn-unused-ignores,
154
- --warn-return-any, --no-implicit-reexport, --strict-equality, --strict-concatenate.
155
- disable_error_code: Disable a specific error code.
156
- enable_error_code: Enable a specific error code.
157
- show_error_context: Precede errors with "note:" messages explaining context (inverse: --hide-error-context).
158
- show_column_numbers: Show column numbers in error messages (inverse: --hide-column-numbers).
159
- show_error_end: Show end line/end column numbers in error messages. This implies --show-column-numbers
160
- (inverse: --hide-error-end).
161
- hide_error_codes: Hide error codes in error messages (inverse: --show-error-codes).
162
- pretty: Use visually nicer output in error messages: Use soft word wrap, show source code snippets,
163
- and show error location markers (inverse: --no-pretty).
164
- no_color_output: Do not colorize error messages (inverse: --color-output).
165
- no_error_summary: Do not show error stats summary (inverse: --error-summary).
166
- show_absolute_path: Show absolute paths to files (inverse: --hide-absolute-path).
167
- no_incremental: Disable module cache (inverse: --incremental).
168
- cache_dir: Store module cache info in the given folder in incremental mode (defaults to '.mypy_cache').
169
- sqlite_cache: Use a sqlite database to store the cache (inverse: --no-sqlite-cache).
170
- cache_fine_grained: Include fine-grained dependency information in the cache for the mypy daemon.
171
- skip_version_check: Allow using cache written by older mypy version.
172
- skip_cache_mtime_checks: Skip cache internal consistency checks based on mtime.
173
- pdb: Invoke pdb on fatal error.
174
- show_traceback: Show traceback on fatal error.
175
- raise_exceptions: Raise exception on fatal error.
176
- custom_typing_module: Use a custom typing module.
177
- disable_recursive_aliases: Disable experimental support for recursive type aliases.
178
- custom_typeshed_dir: Use the custom typeshed in DIR.
179
- warn_incomplete_stub: Warn if missing type annotation in typeshed, only relevant with --disallow-untyped-defs
180
- or --disallow-incomplete-defs enabled (inverse: --no-warn-incomplete-stub).
181
- shadow_file: When encountering SOURCE_FILE, read and type check the contents of SHADOW_FILE instead..
182
- any_exprs_report: Report any expression.
183
- cobertura_xml_report: Report Cobertura.
184
- html_report: Report HTML.
185
- linecount_report: Report line count.
186
- linecoverage_report: Report line coverage.
187
- lineprecision_report: Report line precision.
188
- txt_report: Report text.
189
- xml_report: Report XML.
190
- xslt_html_report: Report XLST HTML.
191
- xslt_txt_report: Report XLST text.
192
- junit_xml: Write junit.xml to the given file.
193
- find_occurrences: Print out all usages of a class member (experimental).
194
- scripts_are_modules: Script x becomes module x instead of __main__.
195
- install_types: Install detected missing library stub packages using pip (inverse: --no-install-types).
196
- non_interactive: Install stubs without asking for confirmation and hide errors, with --install-types
197
- (inverse: --interactive).
198
- explicit_package_bases: Use current directory and MYPYPATH to determine module names of files passed
199
- (inverse: --no-explicit-package-bases).
200
- exclude: Regular expression to match file names, directory names or paths which mypy should ignore while
201
- recursively discovering files to check, e.g. --exclude '/setup\\.py$'.
202
- May be specified more than once, eg. --exclude a --exclude b.
203
- module: Type-check module; can repeat for more modules.
204
- package: Type-check package recursively; can be repeated.
205
- command: Type-check program passed in as string.
206
- """ # noqa: D301
207
- from mypy.main import main as mypy
208
-
209
- cli_args = list(paths)
210
-
211
- if enable_incomplete_feature:
212
- cli_args.append("--enable-incomplete-feature")
213
-
214
- if verbose:
215
- cli_args.append("--verbose")
216
-
217
- if config_file:
218
- cli_args.append("--config-file")
219
- cli_args.append(config_file)
220
-
221
- if warn_unused_configs:
222
- cli_args.append("--warn-unused-configs")
223
-
224
- if no_namespace_packages:
225
- cli_args.append("--no-namespace-packages")
226
-
227
- if ignore_missing_imports:
228
- cli_args.append("--ignore-missing-imports")
229
-
230
- if follow_imports:
231
- cli_args.append("--follow-imports")
232
- cli_args.append(follow_imports)
233
-
234
- if python_executable:
235
- cli_args.append("--python-executable")
236
- cli_args.append(python_executable)
237
-
238
- if no_site_packages:
239
- cli_args.append("--no-site-packages")
240
-
241
- if no_silence_site_packages:
242
- cli_args.append("--no-silence-site-packages")
243
-
244
- if python_version:
245
- cli_args.append("--python-version")
246
- cli_args.append(python_version)
247
-
248
- if py2:
249
- cli_args.append("--py2")
250
-
251
- if platform:
252
- cli_args.append("--platform")
253
- cli_args.append(platform)
254
-
255
- if always_true:
256
- for posarg in always_true:
257
- cli_args.append("--always-true")
258
- cli_args.append(posarg)
259
-
260
- if always_false:
261
- for posarg in always_false:
262
- cli_args.append("--always-false")
263
- cli_args.append(posarg)
264
-
265
- if disallow_any_unimported:
266
- cli_args.append("--disallow-any-unimported")
267
-
268
- if disallow_any_expr:
269
- cli_args.append("--disallow-any-expr")
270
-
271
- if disallow_any_decorated:
272
- cli_args.append("--disallow-any-decorated")
273
-
274
- if disallow_any_explicit:
275
- cli_args.append("--disallow-any-explicit")
276
-
277
- if disallow_any_generics:
278
- cli_args.append("--disallow-any-generics")
279
-
280
- if disallow_subclassing_any:
281
- cli_args.append("--disallow-subclassing-any")
282
-
283
- if disallow_untyped_calls:
284
- cli_args.append("--disallow-untyped-calls")
285
-
286
- if disallow_untyped_defs:
287
- cli_args.append("--disallow-untyped-defs")
288
-
289
- if disallow_incomplete_defs:
290
- cli_args.append("--disallow-incomplete-defs")
291
-
292
- if check_untyped_defs:
293
- cli_args.append("--check-untyped-defs")
294
-
295
- if disallow_untyped_decorators:
296
- cli_args.append("--disallow-untyped-decorators")
297
-
298
- if implicit_optional:
299
- cli_args.append("--implicit-optional")
300
-
301
- if no_strict_optional:
302
- cli_args.append("--no-strict-optional")
303
-
304
- if warn_redundant_casts:
305
- cli_args.append("--warn-redundant-casts")
306
-
307
- if warn_unused_ignores:
308
- cli_args.append("--warn-unused-ignores")
309
-
310
- if no_warn_no_return:
311
- cli_args.append("--no-warn-no-return")
312
-
313
- if warn_return_any:
314
- cli_args.append("--warn-return-any")
315
-
316
- if warn_unreachable:
317
- cli_args.append("--warn-unreachable")
318
-
319
- if allow_untyped_globals:
320
- cli_args.append("--allow-untyped-globals")
321
-
322
- if allow_redefinition:
323
- cli_args.append("--allow-redefinition")
324
-
325
- if no_implicit_reexport:
326
- cli_args.append("--no-implicit-reexport")
327
-
328
- if strict_equality:
329
- cli_args.append("--strict-equality")
330
-
331
- if strict_concatenate:
332
- cli_args.append("--strict-concatenate")
333
-
334
- if strict:
335
- cli_args.append("--strict")
336
-
337
- if disable_error_code:
338
- cli_args.append("--disable-error-code")
339
- cli_args.append(disable_error_code)
340
-
341
- if enable_error_code:
342
- cli_args.append("--enable-error-code")
343
- cli_args.append(enable_error_code)
344
-
345
- if show_error_context:
346
- cli_args.append("--show-error-context")
347
-
348
- if show_column_numbers:
349
- cli_args.append("--show-column-numbers")
350
-
351
- if show_error_end:
352
- cli_args.append("--show-error-end")
353
-
354
- if hide_error_codes:
355
- cli_args.append("--hide-error-codes")
356
-
357
- if pretty:
358
- cli_args.append("--pretty")
359
-
360
- if no_color_output:
361
- cli_args.append("--no-color-output")
362
-
363
- if no_error_summary:
364
- cli_args.append("--no-error-summary")
365
-
366
- if show_absolute_path:
367
- cli_args.append("--show-absolute-path")
368
-
369
- if no_incremental:
370
- cli_args.append("--no-incremental")
371
-
372
- if cache_dir:
373
- cli_args.append("--cache-dir")
374
- cli_args.append(cache_dir)
375
-
376
- if sqlite_cache:
377
- cli_args.append("--sqlite-cache")
378
-
379
- if cache_fine_grained:
380
- cli_args.append("--cache-fine-grained")
381
-
382
- if skip_version_check:
383
- cli_args.append("--skip-version-check")
384
-
385
- if skip_cache_mtime_checks:
386
- cli_args.append("--skip-cache-mtime-checks")
387
-
388
- if pdb:
389
- cli_args.append("--pdb")
390
-
391
- if show_traceback:
392
- cli_args.append("--show-traceback")
393
-
394
- if raise_exceptions:
395
- cli_args.append("--raise-exceptions")
396
-
397
- if custom_typing_module:
398
- cli_args.append("--custom-typing-module")
399
- cli_args.append(custom_typing_module)
400
-
401
- if disable_recursive_aliases:
402
- cli_args.append("--disable-recursive-aliases")
403
-
404
- if custom_typeshed_dir:
405
- cli_args.append("--custom-typeshed-dir")
406
- cli_args.append(custom_typeshed_dir)
407
-
408
- if warn_incomplete_stub:
409
- cli_args.append("--warn-incomplete-stub")
410
-
411
- if shadow_file:
412
- cli_args.append("--shadow-file")
413
- cli_args.extend(shadow_file)
414
-
415
- if any_exprs_report:
416
- cli_args.append("--any-exprs-report")
417
- cli_args.append(any_exprs_report)
418
-
419
- if cobertura_xml_report:
420
- cli_args.append("--cobertura-xml-report")
421
- cli_args.append(cobertura_xml_report)
422
-
423
- if html_report:
424
- cli_args.append("--html-report")
425
- cli_args.append(html_report)
426
-
427
- if linecount_report:
428
- cli_args.append("--linecount-report")
429
- cli_args.append(linecount_report)
430
-
431
- if linecoverage_report:
432
- cli_args.append("--linecoverage-report")
433
- cli_args.append(linecoverage_report)
434
-
435
- if lineprecision_report:
436
- cli_args.append("--lineprecision-report")
437
- cli_args.append(lineprecision_report)
438
-
439
- if txt_report:
440
- cli_args.append("--txt-report")
441
- cli_args.append(txt_report)
442
-
443
- if xml_report:
444
- cli_args.append("--xml-report")
445
- cli_args.append(xml_report)
446
-
447
- if xslt_html_report:
448
- cli_args.append("--xslt-html-report")
449
- cli_args.append(xslt_html_report)
450
-
451
- if xslt_txt_report:
452
- cli_args.append("--xslt-txt-report")
453
- cli_args.append(xslt_txt_report)
454
-
455
- if junit_xml:
456
- cli_args.append("--junit-xml")
457
- cli_args.append(junit_xml)
458
-
459
- if find_occurrences:
460
- cli_args.append("--find-occurrences")
461
- cli_args.append(find_occurrences)
462
-
463
- if scripts_are_modules:
464
- cli_args.append("--scripts-are-modules")
465
-
466
- if install_types:
467
- cli_args.append("--install-types")
468
-
469
- if non_interactive:
470
- cli_args.append("--non-interactive")
471
-
472
- if explicit_package_bases:
473
- cli_args.append("--explicit-package-bases")
474
-
475
- if exclude:
476
- cli_args.append("--exclude")
477
- cli_args.append(exclude)
478
-
479
- if module:
480
- cli_args.append("--module")
481
- cli_args.append(module)
482
-
483
- if package:
484
- cli_args.append("--package")
485
- cli_args.append(package)
486
-
487
- if command:
488
- cli_args.append("--command")
489
- cli_args.append(command)
490
-
491
- mypy(
492
- args=cli_args,
493
- stdout=_LazyStdout(),
494
- stderr=_LazyStderr(),
495
- clean_exit=True,
11
+ def __getattr__(name: str) -> Any:
12
+ warnings.warn(
13
+ "Callables are deprecated in favor of tools, use `duty.tools.mypy` instead of `duty.callables.mypy`.",
14
+ DeprecationWarning,
15
+ stacklevel=2,
496
16
  )
17
+ return getattr(_mypy, name)