mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 15:11:34 +00:00 
			
		
		
		
	bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663)
This commit is contained in:
		
							parent
							
								
									077059e0f0
								
							
						
					
					
						commit
						423d05f6f5
					
				
					 3 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -813,7 +813,7 @@ def with_suffix(self, suffix):
 | 
			
		|||
        """
 | 
			
		||||
        f = self._flavour
 | 
			
		||||
        if f.sep in suffix or f.altsep and f.altsep in suffix:
 | 
			
		||||
            raise ValueError("Invalid suffix %r" % (suffix))
 | 
			
		||||
            raise ValueError("Invalid suffix %r" % (suffix,))
 | 
			
		||||
        if suffix and not suffix.startswith('.') or suffix == '.':
 | 
			
		||||
            raise ValueError("Invalid suffix %r" % (suffix))
 | 
			
		||||
        name = self.name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue