wexample-filestate-python 0.0.45__tar.gz → 0.0.48__tar.gz

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 (81) hide show
  1. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/PKG-INFO +54 -4
  2. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/README.md +50 -1
  3. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/pyproject.toml +4 -3
  4. wexample_filestate_python-0.0.48/src/wexample_filestate_python/const/python_file.py +5 -0
  5. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/remove_unused_option.py +2 -1
  6. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/__init__.py +0 -0
  7. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/__pycache__/__init__.py +0 -0
  8. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/common/__init__.py +0 -0
  9. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/common/__pycache__/__init__.py +0 -0
  10. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/common/pipy_gateway.py +0 -0
  11. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_option/__init__.py +0 -0
  12. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_option/__pycache__/__init__.py +0 -0
  13. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_option/mixin/__init__.py +0 -0
  14. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_option/mixin/__pycache__/__init__.py +0 -0
  15. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_option/mixin/with_stdout_wrapping_mixin.py +0 -0
  16. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_value/__init__.py +0 -0
  17. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_value/__pycache__/__init__.py +0 -0
  18. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/config_value/python_config_value.py +0 -0
  19. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/const/__init__.py +0 -0
  20. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/const/__pycache__/__init__.py +0 -0
  21. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/const/name_pattern.py +0 -0
  22. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/file/__init__.py +0 -0
  23. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/file/__pycache__/__init__.py +0 -0
  24. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/file/python_file.py +0 -0
  25. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/helpers/__init__.py +0 -0
  26. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/helpers/__pycache__/__init__.py +0 -0
  27. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/helpers/package.py +0 -0
  28. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/helpers/toml.py +0 -0
  29. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/__init__.py +0 -0
  30. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/__pycache__/__init__.py +0 -0
  31. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/abstract_python_file_content_option.py +0 -0
  32. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/add_future_annotations_option.py +0 -0
  33. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/add_return_types_option.py +0 -0
  34. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/fix_attrs_option.py +0 -0
  35. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/fix_blank_lines_option.py +0 -0
  36. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/format_option.py +0 -0
  37. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/fstringify_option.py +0 -0
  38. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/modernize_typing_option.py +0 -0
  39. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_class_attributes_option.py +0 -0
  40. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_class_docstring_option.py +0 -0
  41. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_class_methods_option.py +0 -0
  42. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_constants_option.py +0 -0
  43. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_iterable_items_option.py +0 -0
  44. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_main_guard_option.py +0 -0
  45. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_module_docstring_option.py +0 -0
  46. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_module_functions_option.py +0 -0
  47. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_module_metadata_option.py +0 -0
  48. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/order_type_checking_block_option.py +0 -0
  49. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/python_option.py +0 -0
  50. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/relocate_imports_option.py +0 -0
  51. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/sort_imports_option.py +0 -0
  52. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/option/unquote_annotations_option.py +0 -0
  53. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/options_provider/__init__.py +0 -0
  54. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/options_provider/__pycache__/__init__.py +0 -0
  55. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/options_provider/python_options_provider.py +0 -0
  56. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/py.typed +0 -0
  57. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/__init__.py +0 -0
  58. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/__pycache__/__init__.py +0 -0
  59. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_attrs_utils.py +0 -0
  60. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_blank_lines_utils.py +0 -0
  61. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_class_attributes_utils.py +0 -0
  62. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_class_docstring_utils.py +0 -0
  63. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_class_methods_utils.py +0 -0
  64. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_constants_utils.py +0 -0
  65. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_docstring_utils.py +0 -0
  66. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_functions_utils.py +0 -0
  67. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_iterable_utils.py +0 -0
  68. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_main_guard_utils.py +0 -0
  69. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_module_metadata_utils.py +0 -0
  70. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/python_type_checking_utils.py +0 -0
  71. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/__init__.py +0 -0
  72. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/__pycache__/__init__.py +0 -0
  73. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/python_import_rewriter.py +0 -0
  74. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/python_localize_runtime_imports.py +0 -0
  75. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/python_parser_import_index.py +0 -0
  76. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/python_runtime_symbol_collector.py +0 -0
  77. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/utils/relocate_imports/python_usage_collector.py +0 -0
  78. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/workdir/__init__.py +0 -0
  79. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/src/wexample_filestate_python/workdir/__pycache__/__init__.py +0 -0
  80. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/tests/tests/__init__.py +0 -0
  81. {wexample_filestate_python-0.0.45 → wexample_filestate_python-0.0.48}/tests/wexample_tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-filestate-python
3
- Version: 0.0.45
3
+ Version: 0.0.48
4
4
  Summary: Helpers for Python.
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -10,12 +10,13 @@ Classifier: Operating System :: OS Independent
10
10
  Project-URL: homepage, https://github.com/wexample/python-filestate-python
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: attrs>=23.1.0
13
+ Requires-Dist: autoflake
13
14
  Requires-Dist: cattrs>=23.1.0
14
15
  Requires-Dist: libcst
15
16
  Requires-Dist: packaging
16
17
  Requires-Dist: tomli
17
- Requires-Dist: wexample-filestate==0.0.56
18
- Requires-Dist: wexample-helpers-api==0.0.37
18
+ Requires-Dist: wexample-filestate==0.0.61
19
+ Requires-Dist: wexample-helpers-api==0.0.71
19
20
  Provides-Extra: dev
20
21
  Requires-Dist: pytest; extra == "dev"
21
22
  Requires-Dist: pytest-cov; extra == "dev"
@@ -23,10 +24,59 @@ Description-Content-Type: text/markdown
23
24
 
24
25
  # wexample-filestate-python
25
26
 
26
- Version: 0.0.45
27
+ Version: 0.0.48
27
28
 
28
29
  Helpers for Python.
29
30
 
31
+ ## Tests
32
+
33
+ This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
34
+
35
+ ### Installation
36
+
37
+ First, install the required testing dependencies:
38
+ ```bash
39
+ .venv/bin/python -m pip install pytest pytest-cov
40
+ ```
41
+
42
+ ### Basic Usage
43
+
44
+ Run all tests with coverage:
45
+ ```bash
46
+ .venv/bin/python -m pytest --cov
47
+ ```
48
+
49
+ ### Common Commands
50
+ ```bash
51
+ # Run tests with coverage for a specific module
52
+ .venv/bin/python -m pytest --cov=your_module
53
+
54
+ # Show which lines are not covered
55
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
56
+
57
+ # Generate an HTML coverage report
58
+ .venv/bin/python -m pytest --cov=your_module --cov-report=html
59
+
60
+ # Combine terminal and HTML reports
61
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
62
+
63
+ # Run specific test file with coverage
64
+ .venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
65
+ ```
66
+
67
+ ### Viewing HTML Reports
68
+
69
+ After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
70
+
71
+ ### Coverage Threshold
72
+
73
+ To enforce a minimum coverage percentage:
74
+ ```bash
75
+ .venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
76
+ ```
77
+
78
+ This will cause the test suite to fail if coverage drops below 80%.
79
+
30
80
  ## Code Quality & Typing
31
81
 
32
82
  All the suite packages follow strict quality standards:
@@ -1,9 +1,58 @@
1
1
  # wexample-filestate-python
2
2
 
3
- Version: 0.0.45
3
+ Version: 0.0.48
4
4
 
5
5
  Helpers for Python.
6
6
 
7
+ ## Tests
8
+
9
+ This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
10
+
11
+ ### Installation
12
+
13
+ First, install the required testing dependencies:
14
+ ```bash
15
+ .venv/bin/python -m pip install pytest pytest-cov
16
+ ```
17
+
18
+ ### Basic Usage
19
+
20
+ Run all tests with coverage:
21
+ ```bash
22
+ .venv/bin/python -m pytest --cov
23
+ ```
24
+
25
+ ### Common Commands
26
+ ```bash
27
+ # Run tests with coverage for a specific module
28
+ .venv/bin/python -m pytest --cov=your_module
29
+
30
+ # Show which lines are not covered
31
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
32
+
33
+ # Generate an HTML coverage report
34
+ .venv/bin/python -m pytest --cov=your_module --cov-report=html
35
+
36
+ # Combine terminal and HTML reports
37
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
38
+
39
+ # Run specific test file with coverage
40
+ .venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
41
+ ```
42
+
43
+ ### Viewing HTML Reports
44
+
45
+ After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
46
+
47
+ ### Coverage Threshold
48
+
49
+ To enforce a minimum coverage percentage:
50
+ ```bash
51
+ .venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
52
+ ```
53
+
54
+ This will cause the test suite to fail if coverage drops below 80%.
55
+
7
56
  ## Code Quality & Typing
8
57
 
9
58
  All the suite packages follow strict quality standards:
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "wexample-filestate-python"
9
- version = "0.0.45"
9
+ version = "0.0.48"
10
10
  description = "Helpers for Python."
11
11
  authors = [
12
12
  { name = "weeger", email = "contact@wexample.com" },
@@ -19,12 +19,13 @@ classifiers = [
19
19
  ]
20
20
  dependencies = [
21
21
  "attrs>=23.1.0",
22
+ "autoflake",
22
23
  "cattrs>=23.1.0",
23
24
  "libcst",
24
25
  "packaging",
25
26
  "tomli",
26
- "wexample-filestate==0.0.56",
27
- "wexample-helpers-api==0.0.37",
27
+ "wexample-filestate==0.0.61",
28
+ "wexample-helpers-api==0.0.71",
28
29
  ]
29
30
 
30
31
  [project.readme]
@@ -0,0 +1,5 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+ PYTHON_FILE_PYTEST_COVERAGE_JSON: Path = Path("coverage.json")
@@ -18,10 +18,11 @@ class RemoveUnusedOption(AbstractPythonFileContentOption):
18
18
  def _apply_content_change(self, target: TargetFileOrDirectoryType) -> str:
19
19
  """Remove unused Python imports using autoflake."""
20
20
  from wexample_helpers.helpers.shell import shell_run
21
+ from wexample_helpers.helpers.system import system_get_venv_bin_path
21
22
 
22
23
  result = shell_run(
23
24
  cmd=[
24
- "autoflake",
25
+ f"{system_get_venv_bin_path()}/autoflake",
25
26
  "--stdout",
26
27
  "--remove-all-unused-imports",
27
28
  "--remove-unused-variables",