@@ -79,7 +79,6 @@ def show(self, file=None):
79
79
if isinstance (self .extra , str ):
80
80
self .extra = [self .extra ]
81
81
for extra in self .extra :
82
- extra = f"[pipenv.exceptions.{ self .__class__ .__name__ } ]: { extra } "
83
82
console .print (extra )
84
83
console .print (f"{ self .message } " )
85
84
@@ -310,29 +309,16 @@ def __init__(self, message):
310
309
class ResolutionFailure (PipenvException ):
311
310
def __init__ (self , message , no_version_found = False ):
312
311
extra = (
313
- "{}: Your dependencies could not be resolved. You likely have a "
314
- "mismatch in your sub-dependencies.\n "
315
- "You can use {} to bypass this mechanism, then run "
316
- "{} to inspect the versions actually installed in the virtualenv.\n "
317
- "Hint: try {} if it is a pre-release dependency."
318
- "" .format (
319
- click .style ("Warning" , fg = "red" , bold = True ),
320
- click .style ("$ pipenv run pip install <requirement_name>" , fg = "yellow" ),
321
- click .style ("$ pipenv graph" , fg = "yellow" ),
322
- click .style ("$ pipenv lock --pre" , fg = "yellow" ),
323
- ),
312
+ "Your dependencies could not be resolved. You likely have a "
313
+ "mismatch in your sub-dependencies.\n "
314
+ "You can use [yellow]$ pipenv run pip install <requirement_name>[/yellow] to bypass this mechanism, then run "
315
+ "[yellow]$ pipenv graph[/yellow] to inspect the versions actually installed in the virtualenv.\n "
316
+ "Hint: try [yellow]$ pipenv lock --pre[/yellow] if it is a pre-release dependency."
324
317
)
325
- if "no version found at all" in message :
326
- no_version_found = True
327
- message = click .style (f"{ message } " , fg = "yellow" )
328
- if no_version_found :
329
- message = "{}\n {}" .format (
330
- message ,
331
- click .style (
332
- "Please check your version specifier and version number. "
333
- "See PEP440 for more information." ,
334
- fg = "cyan" ,
335
- ),
318
+ if "no version found at all" in str (message ):
319
+ message += (
320
+ "[cyan]Please check your version specifier and version number. "
321
+ "See PEP440 for more information.[/cyan]"
336
322
)
337
323
PipenvException .__init__ (self , message , extra = extra )
338
324
0 commit comments