Skip to content

Commit fa0e7dd

Browse files
authored
Fix Overconstraint (#98)
1 parent 7f8f4a7 commit fa0e7dd

3 files changed

Lines changed: 23 additions & 31 deletions

File tree

cppython/builder.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,12 @@ def create_generator(
210210
cppython_data=cppython_plugin_data,
211211
)
212212

213-
plugin = plugin_info.plugin_type()
214-
plugin.configure(generator_data, core_plugin_data)
215-
216213
if not generator_configuration:
217214
self.logger.error(
218215
"The pyproject.toml table 'tool.cppython.generator' does not exist. Sending generator empty data",
219216
)
220217

221-
plugin.activate(generator_configuration)
222-
223-
return plugin
218+
return plugin_info.plugin_type(generator_data, core_plugin_data, generator_configuration)
224219

225220
def create_provider(self, core_data: CoreData, provider_configuration: dict[str, Any]) -> Provider:
226221
"""Creates Providers from input data
@@ -287,15 +282,9 @@ def create_provider(self, core_data: CoreData, provider_configuration: dict[str,
287282
cppython_data=cppython_plugin_data,
288283
)
289284

290-
plugin = supported_plugin_type()
291-
292-
plugin.configure(provider_data, core_plugin_data)
293-
294285
if not provider_configuration:
295286
self.logger.error(
296287
"The pyproject.toml table 'tool.cppython.provider' does not exist. Sending provider empty data",
297288
)
298289

299-
plugin.activate(provider_configuration)
300-
301-
return plugin
290+
return supported_plugin_type(provider_data, core_plugin_data, provider_configuration)

cppython/plugins/git.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ def information() -> Information:
3838
"""
3939
return Information()
4040

41-
def version(self, path: Path) -> str | None:
41+
def version(self, path: Path) -> str:
4242
"""Extracts the system's version metadata
4343
4444
Args:
4545
path: The repository path
46+
47+
Returns:
48+
The git version
4649
"""
47-
return None
50+
return ""
4851

4952
def description(self) -> str | None:
5053
"""Requests extraction of the project description"""

pdm.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)