PEP8-ize
This commit is contained in:
		
							parent
							
								
									a599141084
								
							
						
					
					
						commit
						fa0e3681bf
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -217,6 +217,7 @@ CommentFormatMap = {None: None, 'Niconico': ReadCommentsNiconico, 'Acfun': ReadC | ||||||
| def WriteCommentBilibiliPositioned(f, c, width, height, styleid): | def WriteCommentBilibiliPositioned(f, c, width, height, styleid): | ||||||
|     BiliPlayerSize = (672, 437) |     BiliPlayerSize = (672, 437) | ||||||
|     BiliPlayerAspect = 672/437 |     BiliPlayerAspect = 672/437 | ||||||
|  | 
 | ||||||
|     def GetZoomFactor(TargetSize): |     def GetZoomFactor(TargetSize): | ||||||
|         try: |         try: | ||||||
|             if TargetSize == GetZoomFactor.Cached_TargetSize: |             if TargetSize == GetZoomFactor.Cached_TargetSize: | ||||||
|  | @ -238,7 +239,9 @@ def WriteCommentBilibiliPositioned(f, c, width, height, styleid): | ||||||
|         except ZeroDivisionError: |         except ZeroDivisionError: | ||||||
|             GetZoomFactor.Cached_Result = (1, 0, 0) |             GetZoomFactor.Cached_Result = (1, 0, 0) | ||||||
|             return GetZoomFactor.Cached_Result |             return GetZoomFactor.Cached_Result | ||||||
|  | 
 | ||||||
|     ZoomFactor = GetZoomFactor((width, height)) |     ZoomFactor = GetZoomFactor((width, height)) | ||||||
|  | 
 | ||||||
|     def GetPosition(InputPos, isHeight): |     def GetPosition(InputPos, isHeight): | ||||||
|         isHeight = int(isHeight)  # True -> 1 |         isHeight = int(isHeight)  # True -> 1 | ||||||
|         if isinstance(InputPos, int): |         if isinstance(InputPos, int): | ||||||
|  | @ -254,6 +257,7 @@ def WriteCommentBilibiliPositioned(f, c, width, height, styleid): | ||||||
|             except ValueError: |             except ValueError: | ||||||
|                 InputPos = float(InputPos) |                 InputPos = float(InputPos) | ||||||
|             return GetPosition(InputPos, isHeight) |             return GetPosition(InputPos, isHeight) | ||||||
|  | 
 | ||||||
|     try: |     try: | ||||||
|         comment_args = safe_list(json.loads(c[3])) |         comment_args = safe_list(json.loads(c[3])) | ||||||
|         text = str(comment_args[4]).replace('\\', '\\\\').replace('/n', '\\N').replace('{', '\\{').replace('}', '\\}') |         text = str(comment_args[4]).replace('\\', '\\\\').replace('/n', '\\N').replace('{', '\\{').replace('}', '\\}') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Star Brilliant
						Star Brilliant