mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 01:47:36 +03:00 
			
		
		
		
	Add Cursor rules
This commit is contained in:
		
							parent
							
								
									8814db3fb3
								
							
						
					
					
						commit
						f50cc95405
					
				
							
								
								
									
										29
									
								
								.cursor/rules/coding-guide.mdc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.cursor/rules/coding-guide.mdc
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,29 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					description: Code in Python and Cython
 | 
				
			||||||
 | 
					globs:
 | 
				
			||||||
 | 
					alwaysApply: false
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					- Follow PEP 8 rules
 | 
				
			||||||
 | 
					- When you write imports, split system, 3rd-party, and local imports with a new line
 | 
				
			||||||
 | 
					- Have two empty lines between the import block and the rest of the code
 | 
				
			||||||
 | 
					- Have an empty line (\n) at the end of every file
 | 
				
			||||||
 | 
					- If a file is supposed to be run, always add ``if __name__ == 'main'``
 | 
				
			||||||
 | 
					- Always follow a consistent pattern of using double or single quotes
 | 
				
			||||||
 | 
					- When there is a class without a docblock, leave one blank line before its members, e.g.:
 | 
				
			||||||
 | 
					```python
 | 
				
			||||||
 | 
					class Container(containers.DeclarativeContainer):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    service = providers.Factory(Service)
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Avoid shortcuts in names unless absolutely necessarry, exceptions:
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					arg
 | 
				
			||||||
 | 
					args
 | 
				
			||||||
 | 
					kwarg
 | 
				
			||||||
 | 
					kwargs
 | 
				
			||||||
 | 
					obj
 | 
				
			||||||
 | 
					cls
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Avoid inline comments unless absolutely necessarry
 | 
				
			||||||
							
								
								
									
										7
									
								
								.cursor/rules/makefile-commands.mdc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.cursor/rules/makefile-commands.mdc
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					description: Build and run tests
 | 
				
			||||||
 | 
					globs:
 | 
				
			||||||
 | 
					alwaysApply: false
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					- Use Makefile commands to build, test, lint and other similar operations when they are available.
 | 
				
			||||||
 | 
					- Activate virtualenv before running any commands by ``. venv/bin/actvate``
 | 
				
			||||||
							
								
								
									
										8
									
								
								.cursor/rules/run-examples.mdc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.cursor/rules/run-examples.mdc
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					description: Run examples
 | 
				
			||||||
 | 
					globs:
 | 
				
			||||||
 | 
					alwaysApply: false
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					- When you run an example from the ``examples/`` folder, switch to the example folder and run it from there.
 | 
				
			||||||
 | 
					- If there are instructions on running the examples or its tests in readme, follow them
 | 
				
			||||||
 | 
					- Activate virtualenv before running any commands by ``. venv/bin/actvate``
 | 
				
			||||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -73,6 +73,3 @@ src/**/*.html
 | 
				
			||||||
.workspace/
 | 
					.workspace/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.vscode/
 | 
					.vscode/
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Cursor project files
 | 
					 | 
				
			||||||
.cursor
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user