mirror of
				https://github.com/TheLocehiliosan/yadm
				synced 2025-06-13 13:03:58 +00:00 
			
		
		
		
	A local class is set with:
$ yadm config local.class cls1
More classes can be added with:
$ yadm config --add local.class cls2
$ yadm config --add local.class cls3
Any of cls1, cls2 and cls3 can be used in an alternate condition.
For templates, the existing variable yadm.class/YADM_CLASS is set to
the last class (i.e. cls3) to remain compatible with how it works
today and with what the following command gives:
$ yadm config local.class
For the default template processor there is no explicit yadm.classes
variable. Instead a yadm.class condition will check against all
classes.
For the other processors, a new template variable YADM_CLASSES will be
set to all classes separated by newline. For jinja2 templates a class
can be checked with: {%- if "cls" in YADM_CLASSES.split("\n") %}
For esh templates the logic is a bit more complex, but it is possible
to do.
Fixes #185.
		
	
			
		
			
				
	
	
		
			18 lines
		
	
	
		
			221 B
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			221 B
		
	
	
	
		
			INI
		
	
	
	
	
	
| [BASIC]
 | |
| good-names=pytestmark
 | |
| 
 | |
| [DESIGN]
 | |
| max-args=14
 | |
| max-locals=28
 | |
| max-attributes=8
 | |
| max-statements=65
 | |
| 
 | |
| [SIMILARITIES]
 | |
| min-similarity-lines=8
 | |
| 
 | |
| [MESSAGES CONTROL]
 | |
| disable=redefined-outer-name
 | |
| 
 | |
| [TYPECHECK]
 | |
| ignored-modules=py
 |