mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 09:57:37 +03:00 
			
		
		
		
	Fix issue 330: FastAPI Depends directive does not work after patching with @inject
This commit is contained in:
		
							parent
							
								
									5c4c84b34e
								
							
						
					
					
						commit
						afa39b148e
					
				| 
						 | 
					@ -336,6 +336,9 @@ def _fetch_reference_injections(
 | 
				
			||||||
        if _is_fastapi_depends(marker):
 | 
					        if _is_fastapi_depends(marker):
 | 
				
			||||||
            marker = marker.dependency
 | 
					            marker = marker.dependency
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if not isinstance(marker, providers.Provider):
 | 
				
			||||||
 | 
					                continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if isinstance(marker, Closing):
 | 
					        if isinstance(marker, Closing):
 | 
				
			||||||
            marker = marker.provider
 | 
					            marker = marker.provider
 | 
				
			||||||
            closing[parameter_name] = marker
 | 
					            closing[parameter_name] = marker
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user