You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add vulture for development and clean up dead code references (#1837)
* Add vulture for development and clean up dead code references
Most of these are from CI implementations which are now removed.
Also sneaking in a change in functionality where we will prefer to use poetry if available in the environment when uv isn't instead of using the None backend and pyproject.toml doesn't exist.
Solves #1816 and solves #1836
* Rename by removing underscore `_get_yaml_document` -> `get_yaml_document`
Add docstring
* Revert bad change to Poetry detection
* Fix broken references in tests
@@ -236,11 +226,6 @@ ALWAYS check whether an existing function already covers your use case before im
236
226
-`ensure_pyproject_toml_via_uv()` (`usethis._backend.uv.init`) — Create a pyproject.toml file using `uv init --bare`.
237
227
-`ensure_symlink_mode()` (`usethis._backend.uv.link_mode`) — Ensure that the symlink link mode is enabled.
238
228
-`ensure_uv_lock()` (`usethis._backend.uv.lockfile`) — Ensure a uv.lock file exists, creating it if necessary.
239
-
-`get_available_uv_python_versions()` (`usethis._backend.uv.python`) — Get the set of Python versions available via uv.
240
-
-`get_supported_uv_minor_python_versions()` (`usethis._backend.uv.python`) — Get the minor Python versions supported by the project and available via uv.
241
-
-`uv_python_pin()` (`usethis._backend.uv.python`) — Pin the Python version for the project using uv.
242
-
-`get_uv_version()` (`usethis._backend.uv.version`) — Get the version string of the installed uv tool.
243
-
-`next_breaking_uv_version()` (`usethis._backend.uv.version`) — Get the next breaking version for a uv version string, following semver.
244
229
-`files_manager()` (`usethis._config_file`) — Context manager that opens all configuration file managers for coordinated I/O.
245
230
-`plain_print()` (`usethis._console`) — Print a plain message to the console, respecting quiet and alert-only settings.
246
231
-`table_print()` (`usethis._console`) — Print a Rich table to the console, respecting quiet and alert-only settings.
@@ -294,7 +279,6 @@ ALWAYS check whether an existing function already covers your use case before im
294
279
-`use_ruff()` (`usethis._core.tool`) — Add Ruff to the project.
295
280
-`use_tach()` (`usethis._core.tool`) — Add and configure the Tach architecture enforcement tool.
296
281
-`use_ty()` (`usethis._core.tool`) — Add and configure the ty type checker tool.
297
-
-`use_tool()` (`usethis._core.tool`) — General dispatch function to add or remove a tool to/from the project.
298
282
-`get_project_deps()` (`usethis._deps`) — Get all project dependencies.
299
283
-`get_dep_groups()` (`usethis._deps`) — Get all dependency groups from pyproject.toml.
300
284
-`get_deps_from_group()` (`usethis._deps`) — Get the list of dependencies in a named dependency group.
@@ -319,21 +303,17 @@ ALWAYS check whether an existing function already covers your use case before im
319
303
-`get_name()` (`usethis._file.pyproject_toml.name`) — Get the project name from pyproject.toml.
320
304
-`get_description()` (`usethis._file.pyproject_toml.name`) — Get the project description from pyproject.toml.
321
305
-`get_project_dict()` (`usethis._file.pyproject_toml.project`) — Get the contents of the [project] section from pyproject.toml.
322
-
-`remove_pyproject_toml()` (`usethis._file.pyproject_toml.remove`) — Remove the pyproject.toml file from the project.
323
306
-`get_requires_python()` (`usethis._file.pyproject_toml.requires_python`) — Get the requires-python constraint from pyproject.toml.
324
307
-`get_required_minor_python_versions()` (`usethis._file.pyproject_toml.requires_python`) — Get Python minor versions that match the project's requires-python constraint.
325
308
-`ensure_pyproject_validity()` (`usethis._file.pyproject_toml.valid`) — Ensure pyproject.toml has a valid structure, adding missing required fields.
326
309
-`prepare_pyproject_write()` (`usethis._file.pyproject_toml.write`) — Prepare the pyproject.toml file for a subprocess that will modify it.
327
-
-`edit_yaml()` (`usethis._file.yaml.io_`) — A context manager to modify a YAML file in-place, with managed read and write.
328
-
-`read_yaml()` (`usethis._file.yaml.io_`) — A context manager to read a YAML file.
310
+
-`get_yaml_document()` (`usethis._file.yaml.io_`) — Get a YAML document representation from a string or file-like object.
329
311
-`update_ruamel_yaml_map()` (`usethis._file.yaml.update`) — Update the values of a ruamel.yaml map in-place using a diff-like algorithm.
330
312
-`lcs_list_update()` (`usethis._file.yaml.update`) — Update in-place using a longest common subsequence solver.
331
313
-`project_init()` (`usethis._init`) — Initialize the project by creating the pyproject.toml and project structure.
332
314
-`write_simple_requirements_txt()` (`usethis._init`) — Write a simple requirements.txt file with -e . and any project dependencies.
333
315
-`ensure_dep_declaration_file()` (`usethis._init`) — Ensure that the file where dependencies are declared exists, if necessary.
334
316
-`ensure_pyproject_toml()` (`usethis._init`) — Ensure that a pyproject.toml file exists, creating it if necessary.
335
-
-`get_github_latest_tag()` (`usethis._integrations.ci.github.tags`) — Get the name of the most recent tag on the default branch of a GitHub repository.
336
-
-`get_supported_minor_python_versions()` (`usethis._integrations.environ.python`) — Get supported Python versions for the current backend.
337
317
-`add_docs_dir()` (`usethis._integrations.mkdocs.core`) — Create the `docs` directory and a `docs/index.md` file if they do not exist.
338
318
-`remove_pre_commit_config()` (`usethis._integrations.pre_commit.core`) — Remove the .pre-commit-config.yaml file from the project.
-`get_hook_ids()` (`usethis._integrations.pre_commit.hooks`) — Get the list of hook IDs currently configured in the pre-commit configuration file.
346
326
-`extract_hook_ids()` (`usethis._integrations.pre_commit.hooks`) — Extract all hook IDs from a pre-commit configuration model.
347
-
-`hooks_are_equivalent()` (`usethis._integrations.pre_commit.hooks`) — Check if two hooks are equivalent.
348
327
-`hook_ids_are_equivalent()` (`usethis._integrations.pre_commit.hooks`) — Check if two hook IDs are equivalent.
349
328
-`ensure_pre_commit_config_exists()` (`usethis._integrations.pre_commit.init`) — Ensure '.pre-commit-config.yaml' exists with minimal valid content.
350
329
-`get_system_language()` (`usethis._integrations.pre_commit.language`) — Get the appropriate 'system' language keyword based on pre-commit version.
351
-
-`get_pre_commit_version()` (`usethis._integrations.pre_commit.version`) — Get an inferred pre-commit version for usethis to target.
352
330
-`get_minimum_pre_commit_version()` (`usethis._integrations.pre_commit.version`) — Get the declared minimum supported pre-commit version from the configuration.
353
331
-`has_pyproject_toml_declared_build_system()` (`usethis._integrations.project.build`) — Check if a build system is declared in the project.
354
332
-`get_layered_architectures()` (`usethis._integrations.project.imports`) — Get the suggested layers for a package.
@@ -370,8 +348,6 @@ ALWAYS check whether an existing function already covers your use case before im
370
348
-`get_endpoint()` (`usethis._pipeweld.func`) — Get the last step name (endpoint) from a pipeline component.
371
349
-`get_predecessor()` (`usethis._pipeweld.func`) — Find the step that immediately precedes `step` in a pipeline component.
372
350
-`call_subprocess()` (`usethis._subprocess`) — Run a subprocess and return its stdout, raising SubprocessFailedError on failure.
373
-
-`change_cwd()` (`usethis._test`) — Change the working directory temporarily.
374
-
-`is_offline()` (`usethis._test`) — Return True if the current environment has no internet connectivity.
375
351
-`ensure_managed_file_exists()` (`usethis._tool.config`) — Ensure a file manager's managed file exists.
376
352
-`is_likely_used()` (`usethis._tool.heuristics`) — Determine whether a tool is likely used in the current project.
377
353
-`is_rule_covered_by()` (`usethis._tool.rule`) — Check if a rule is covered (subsumed) by a more general rule.
Copy file name to clipboardExpand all lines: docs/functions.txt
+1-15Lines changed: 1 addition & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,6 @@
18
18
- `ensure_pyproject_toml_via_uv()` (`usethis._backend.uv.init`) — Create a pyproject.toml file using `uv init --bare`.
19
19
- `ensure_symlink_mode()` (`usethis._backend.uv.link_mode`) — Ensure that the symlink link mode is enabled.
20
20
- `ensure_uv_lock()` (`usethis._backend.uv.lockfile`) — Ensure a uv.lock file exists, creating it if necessary.
21
-
- `get_available_uv_python_versions()` (`usethis._backend.uv.python`) — Get the set of Python versions available via uv.
22
-
- `get_supported_uv_minor_python_versions()` (`usethis._backend.uv.python`) — Get the minor Python versions supported by the project and available via uv.
23
-
- `uv_python_pin()` (`usethis._backend.uv.python`) — Pin the Python version for the project using uv.
24
-
- `get_uv_version()` (`usethis._backend.uv.version`) — Get the version string of the installed uv tool.
25
-
- `next_breaking_uv_version()` (`usethis._backend.uv.version`) — Get the next breaking version for a uv version string, following semver.
26
21
- `files_manager()` (`usethis._config_file`) — Context manager that opens all configuration file managers for coordinated I/O.
27
22
- `plain_print()` (`usethis._console`) — Print a plain message to the console, respecting quiet and alert-only settings.
28
23
- `table_print()` (`usethis._console`) — Print a Rich table to the console, respecting quiet and alert-only settings.
@@ -76,7 +71,6 @@
76
71
- `use_ruff()` (`usethis._core.tool`) — Add Ruff to the project.
77
72
- `use_tach()` (`usethis._core.tool`) — Add and configure the Tach architecture enforcement tool.
78
73
- `use_ty()` (`usethis._core.tool`) — Add and configure the ty type checker tool.
79
-
- `use_tool()` (`usethis._core.tool`) — General dispatch function to add or remove a tool to/from the project.
80
74
- `get_project_deps()` (`usethis._deps`) — Get all project dependencies.
81
75
- `get_dep_groups()` (`usethis._deps`) — Get all dependency groups from pyproject.toml.
82
76
- `get_deps_from_group()` (`usethis._deps`) — Get the list of dependencies in a named dependency group.
@@ -101,21 +95,17 @@
101
95
- `get_name()` (`usethis._file.pyproject_toml.name`) — Get the project name from pyproject.toml.
102
96
- `get_description()` (`usethis._file.pyproject_toml.name`) — Get the project description from pyproject.toml.
103
97
- `get_project_dict()` (`usethis._file.pyproject_toml.project`) — Get the contents of the [project] section from pyproject.toml.
104
-
- `remove_pyproject_toml()` (`usethis._file.pyproject_toml.remove`) — Remove the pyproject.toml file from the project.
105
98
- `get_requires_python()` (`usethis._file.pyproject_toml.requires_python`) — Get the requires-python constraint from pyproject.toml.
106
99
- `get_required_minor_python_versions()` (`usethis._file.pyproject_toml.requires_python`) — Get Python minor versions that match the project's requires-python constraint.
107
100
- `ensure_pyproject_validity()` (`usethis._file.pyproject_toml.valid`) — Ensure pyproject.toml has a valid structure, adding missing required fields.
108
101
- `prepare_pyproject_write()` (`usethis._file.pyproject_toml.write`) — Prepare the pyproject.toml file for a subprocess that will modify it.
109
-
- `edit_yaml()` (`usethis._file.yaml.io_`) — A context manager to modify a YAML file in-place, with managed read and write.
110
-
- `read_yaml()` (`usethis._file.yaml.io_`) — A context manager to read a YAML file.
102
+
- `get_yaml_document()` (`usethis._file.yaml.io_`) — Get a YAML document representation from a string or file-like object.
111
103
- `update_ruamel_yaml_map()` (`usethis._file.yaml.update`) — Update the values of a ruamel.yaml map in-place using a diff-like algorithm.
112
104
- `lcs_list_update()` (`usethis._file.yaml.update`) — Update in-place using a longest common subsequence solver.
113
105
- `project_init()` (`usethis._init`) — Initialize the project by creating the pyproject.toml and project structure.
114
106
- `write_simple_requirements_txt()` (`usethis._init`) — Write a simple requirements.txt file with -e . and any project dependencies.
115
107
- `ensure_dep_declaration_file()` (`usethis._init`) — Ensure that the file where dependencies are declared exists, if necessary.
116
108
- `ensure_pyproject_toml()` (`usethis._init`) — Ensure that a pyproject.toml file exists, creating it if necessary.
117
-
- `get_github_latest_tag()` (`usethis._integrations.ci.github.tags`) — Get the name of the most recent tag on the default branch of a GitHub repository.
118
-
- `get_supported_minor_python_versions()` (`usethis._integrations.environ.python`) — Get supported Python versions for the current backend.
119
109
- `add_docs_dir()` (`usethis._integrations.mkdocs.core`) — Create the `docs` directory and a `docs/index.md` file if they do not exist.
120
110
- `remove_pre_commit_config()` (`usethis._integrations.pre_commit.core`) — Remove the .pre-commit-config.yaml file from the project.
- `get_system_language()` (`usethis._integrations.pre_commit.language`) — Get the appropriate 'system' language keyword based on pre-commit version.
133
-
- `get_pre_commit_version()` (`usethis._integrations.pre_commit.version`) — Get an inferred pre-commit version for usethis to target.
134
122
- `get_minimum_pre_commit_version()` (`usethis._integrations.pre_commit.version`) — Get the declared minimum supported pre-commit version from the configuration.
135
123
- `has_pyproject_toml_declared_build_system()` (`usethis._integrations.project.build`) — Check if a build system is declared in the project.
136
124
- `get_layered_architectures()` (`usethis._integrations.project.imports`) — Get the suggested layers for a package.
@@ -152,8 +140,6 @@
152
140
- `get_endpoint()` (`usethis._pipeweld.func`) — Get the last step name (endpoint) from a pipeline component.
153
141
- `get_predecessor()` (`usethis._pipeweld.func`) — Find the step that immediately precedes `step` in a pipeline component.
154
142
- `call_subprocess()` (`usethis._subprocess`) — Run a subprocess and return its stdout, raising SubprocessFailedError on failure.
155
-
- `change_cwd()` (`usethis._test`) — Change the working directory temporarily.
156
-
- `is_offline()` (`usethis._test`) — Return True if the current environment has no internet connectivity.
0 commit comments