|
16 | 16 | GeneratorConfiguration, |
17 | 17 | Interface, |
18 | 18 | Plugin, |
| 19 | + ProjectDataT, |
19 | 20 | PyProject, |
20 | 21 | ToolData, |
21 | 22 | ) |
@@ -92,7 +93,20 @@ def create_generators( |
92 | 93 |
|
93 | 94 | return _generators |
94 | 95 |
|
95 | | - def generate_modified(self, original: CPPythonDataT) -> CPPythonDataT: |
| 96 | + def generate_modified_project(self, original: ProjectDataT) -> ProjectDataT: |
| 97 | + """ |
| 98 | + Applies dynamic behaviors of the settings to itself |
| 99 | + Returns a copy of the original with dynamic modifications |
| 100 | + """ |
| 101 | + modified = original.copy(deep=True) |
| 102 | + |
| 103 | + # Update the dynamic version |
| 104 | + |
| 105 | + modified.version = self.configuration.version |
| 106 | + |
| 107 | + return modified |
| 108 | + |
| 109 | + def generate_modified_cppython(self, original: CPPythonDataT) -> CPPythonDataT: |
96 | 110 | """ |
97 | 111 | Applies dynamic behaviors of the settings to itself |
98 | 112 | Returns a copy of the original with dynamic modifications |
@@ -231,7 +245,8 @@ def __init__( |
231 | 245 |
|
232 | 246 | self._project = pyproject.project |
233 | 247 |
|
234 | | - self._modified_cppython_data = self._builder.generate_modified(pyproject.tool.cppython) |
| 248 | + self._modified_project_data = self._builder.generate_modified_project(pyproject.project) |
| 249 | + self._modified_cppython_data = self._builder.generate_modified_cppython(pyproject.tool.cppython) |
235 | 250 |
|
236 | 251 | self._interface = interface |
237 | 252 |
|
@@ -259,9 +274,9 @@ def configuration(self) -> ProjectConfiguration: |
259 | 274 | @property |
260 | 275 | def project(self) -> PEP621: |
261 | 276 | """ |
262 | | - The pyproject project table |
| 277 | + The resolved pyproject project table |
263 | 278 | """ |
264 | | - return self._project |
| 279 | + return self._modified_project_data |
265 | 280 |
|
266 | 281 | @property |
267 | 282 | def cppython(self): |
|
0 commit comments