[mypy] configure for usage, need to fix all errors now
This commit is contained in:
		
							parent
							
								
									06e4638f4c
								
							
						
					
					
						commit
						d9fd48a50e
					
				
					 3 changed files with 18 additions and 4 deletions
				
			
		
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| 
						 | 
					@ -14,15 +14,15 @@ push:
 | 
				
			||||||
	docker push registry.domandoman.xyz/fooder/api
 | 
						docker push registry.domandoman.xyz/fooder/api
 | 
				
			||||||
 | 
					
 | 
				
			||||||
black:
 | 
					black:
 | 
				
			||||||
	black fooder
 | 
						python -m black fooder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: mypy
 | 
					.PHONY: mypy
 | 
				
			||||||
mypy:
 | 
					mypy:
 | 
				
			||||||
	mypy fooder
 | 
						python -m mypy fooder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: flake
 | 
					.PHONY: flake
 | 
				
			||||||
flake:
 | 
					flake:
 | 
				
			||||||
	flake8 fooder
 | 
						python -m flake8 fooder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: lint
 | 
					.PHONY: lint
 | 
				
			||||||
lint: black mypy flake
 | 
					lint: black mypy flake
 | 
				
			||||||
| 
						 | 
					@ -34,7 +34,7 @@ version:
 | 
				
			||||||
.PHONY: create-venv
 | 
					.PHONY: create-venv
 | 
				
			||||||
create-venv:
 | 
					create-venv:
 | 
				
			||||||
	python3 -m venv .venv --prompt="fooderapi-venv" --system-site-packages
 | 
						python3 -m venv .venv --prompt="fooderapi-venv" --system-site-packages
 | 
				
			||||||
	bash -c "source .venv/bin/activate && pip install -r requirements_local.txt"
 | 
						bash -c "source .venv/bin/activate && pip install -r requirements_local.txt && (echo y | mypy --install-types)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: test
 | 
					.PHONY: test
 | 
				
			||||||
test:
 | 
					test:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								mypy.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								mypy.ini
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[mypy]
 | 
				
			||||||
 | 
					plugins = sqlalchemy.ext.mypy.plugin,pydantic.mypy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exclude = .*/test/.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pretty = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					platform = linux
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					warn_unused_configs = True
 | 
				
			||||||
 | 
					warn_unused_ignores = True
 | 
				
			||||||
| 
						 | 
					@ -13,3 +13,5 @@ flake8
 | 
				
			||||||
flake8-bugbear
 | 
					flake8-bugbear
 | 
				
			||||||
httpx
 | 
					httpx
 | 
				
			||||||
aiosqlite
 | 
					aiosqlite
 | 
				
			||||||
 | 
					mypy
 | 
				
			||||||
 | 
					types-requests
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue