| 
									
										
										
										
											2020-11-11 21:26:59 -05:00
										 |  |  | """Custom plugin exceptions
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | All exceptions should inherit from the common base exception :exc:`ToxPoetryInstallerException`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | :: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   ToxPoetryInstallerException | 
					
						
							| 
									
										
										
										
											2020-11-12 22:14:49 -05:00
										 |  |  |    +-- SkipEnvironment | 
					
						
							| 
									
										
										
										
											2020-12-04 19:25:40 -05:00
										 |  |  |    |    +-- PoetryNotInstalledError | 
					
						
							| 
									
										
										
										
											2020-11-11 21:26:59 -05:00
										 |  |  |    +-- LockedDepVersionConflictError | 
					
						
							|  |  |  |    +-- LockedDepNotFoundError | 
					
						
							|  |  |  |    +-- ExtraNotFoundError | 
					
						
							| 
									
										
										
										
											2020-11-12 19:38:48 -05:00
										 |  |  |    +-- LockedDepsRequiredError | 
					
						
							| 
									
										
										
										
											2020-11-11 21:26:59 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ToxPoetryInstallerException(Exception): | 
					
						
							|  |  |  |     """Error while installing locked dependencies to the test environment""" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-12 22:14:49 -05:00
										 |  |  | class SkipEnvironment(ToxPoetryInstallerException): | 
					
						
							|  |  |  |     """Current environment does not meet preconditions and should be skipped by the plugin""" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-04 19:25:40 -05:00
										 |  |  | class PoetryNotInstalledError(SkipEnvironment): | 
					
						
							|  |  |  |     """No version of Poetry could be imported from the current Python environment""" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-11 21:26:59 -05:00
										 |  |  | class LockedDepVersionConflictError(ToxPoetryInstallerException): | 
					
						
							|  |  |  |     """Locked dependencies cannot specify an alternate version for installation""" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class LockedDepNotFoundError(ToxPoetryInstallerException): | 
					
						
							|  |  |  |     """Locked dependency was not found in the lockfile""" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ExtraNotFoundError(ToxPoetryInstallerException): | 
					
						
							|  |  |  |     """Project package extra not defined in project's pyproject.toml""" | 
					
						
							| 
									
										
										
										
											2020-11-12 00:24:15 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class LockedDepsRequiredError(ToxPoetryInstallerException): | 
					
						
							|  |  |  |     """Environment cannot specify unlocked dependencies when locked dependencies are required""" |