mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 07:57:55 +03:00 
			
		
		
		
	Fix override func style and regular usage (#7050)
* style: add space and rm redundant parentheses * refactor: use super to replace inherit class * Prefer explicit tuple syntax
This commit is contained in:
		
							parent
							
								
									323e1cddda
								
							
						
					
					
						commit
						cad1b08260
					
				|  | @ -47,12 +47,12 @@ class Hyperlink(str): | |||
|     in some contexts, or render as a plain URL in others. | ||||
|     """ | ||||
|     def __new__(cls, url, obj): | ||||
|         ret = str.__new__(cls, url) | ||||
|         ret = super().__new__(cls, url) | ||||
|         ret.obj = obj | ||||
|         return ret | ||||
| 
 | ||||
|     def __getnewargs__(self): | ||||
|         return(str(self), self.name,) | ||||
|         return (str(self), self.name) | ||||
| 
 | ||||
|     @property | ||||
|     def name(self): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user