Compare commits
	
		
			2 commits
		
	
	
		
			824d6273a6
			...
			97f7f5da2a
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 97f7f5da2a | |||
| 0855c6fbb3 | 
					 3 changed files with 33 additions and 24 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/validation.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/validation.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -46,4 +46,4 @@ jobs: | |||
|         run: slotscheck -m mcproto | ||||
| 
 | ||||
|       - name: Run basedpyright type checker | ||||
|         run: basedpyright . | ||||
|         run: basedpyright --warnings . | ||||
|  |  | |||
|  | @ -36,9 +36,9 @@ repos: | |||
|   - repo: local | ||||
|     hooks: | ||||
|       - id: basedpyright | ||||
|         name: BasedPyright | ||||
|         description: Run BasedPyright type checker | ||||
|         entry: poetry run basedpyright | ||||
|         name: Based Pyright | ||||
|         description: Run basedpyright type checker | ||||
|         entry: poetry run basedpyright --warnings | ||||
|         language: system | ||||
|         types: [python] | ||||
|         pass_filenames: false # pyright runs for the entire project, it can't run for single files | ||||
|  |  | |||
|  | @ -69,8 +69,6 @@ ignore = [ | |||
|   "D416", # Section name should end with a colon | ||||
|   "D417", # Missing argument descrition in the docstring | ||||
| 
 | ||||
|   "ANN002", # Missing type annotation for *args | ||||
|   "ANN003", # Missing type annotation for **kwargs | ||||
|   "ANN101", # Missing type annotation for self in method | ||||
|   "ANN102", # Missing type annotation for cls in classmethod | ||||
|   "ANN204", # Missing return type annotation for special method | ||||
|  | @ -131,25 +129,36 @@ max-statements = 250 | |||
| [tool.ruff.format] | ||||
| line-ending = "lf" | ||||
| 
 | ||||
| [tool.pyright] | ||||
| [tool.basedpyright] | ||||
| pythonPlatform = "All" | ||||
| pythonVersion = "3.11" | ||||
| typeCheckingMode = "standard" | ||||
| typeCheckingMode = "all" | ||||
| 
 | ||||
| reportUntypedFunctionDecorator = "error" | ||||
| reportUntypedClassDecorator = "error" | ||||
| reportUntypedNamedTuple = "error" | ||||
| reportTypeCommentUsage = "error" | ||||
| reportConstantRedefinition = "error" | ||||
| reportDeprecated = "warning" | ||||
| reportIncompatibleMethodOverride = "error" | ||||
| reportOverlappingOverload = "error" | ||||
| reportUnnecessaryIsInstance = "error" | ||||
| reportUnnecessaryCast = "error" | ||||
| reportUnnecessaryComparison = "error" | ||||
| reportUnnecessaryContains = "error" | ||||
| reportUnnecessaryTypeIgnoreComment = "error" | ||||
| reportImplicitOverride = "error" | ||||
| reportShadowedImports = "error" | ||||
| # Diagnostic behavior settings | ||||
| strictListInference = false | ||||
| strictDictionaryInference = false | ||||
| strictSetInference = false | ||||
| analyzeUnannotatedFunctions = true | ||||
| strictParameterNoneValue = true | ||||
| enableTypeIgnoreComments = true | ||||
| deprecateTypingAliases = true | ||||
| enableExperimentalFeatures = false | ||||
| disableBytesTypePromotions = true | ||||
| 
 | ||||
| # Diagnostic rules | ||||
| reportAny = false | ||||
| reportImplicitStringConcatenation = false | ||||
| reportUnreachable = "information" | ||||
| reportMissingTypeStubs = "information" | ||||
| reportUninitializedInstanceVariable = false # until https://github.com/DetachHead/basedpyright/issues/491 | ||||
| reportMissingParameterType = false          # ruff's flake8-annotations (ANN) already covers this + gives us more control | ||||
| 
 | ||||
| # Unknown type reporting rules (too strict for most code-bases) | ||||
| reportUnknownArgumentType = false | ||||
| reportUnknownVariableType = false | ||||
| reportUnknownMemberType = false | ||||
| reportUnknownParameterType = false | ||||
| reportUnknownLambdaType = false | ||||
| 
 | ||||
| [tool.pytest.ini_options] | ||||
| minversion = "6.0" | ||||
|  | @ -204,7 +213,7 @@ cmd = "pytest -v --failed-first" | |||
| help = "Run pytest tests" | ||||
| 
 | ||||
| [tool.poe.tasks.pyright] | ||||
| cmd = "basedpyright ." | ||||
| cmd = "basedpyright --warnings ." | ||||
| help = "Run BasedPyright type-checker" | ||||
| 
 | ||||
| [tool.poe.tasks.retest] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue