mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	Update coding style after pycodestyle 2.1.0
In pycodestyle 2.1.0, E305 was introduced, which requires two blank lines after top level declarations, too. See https://github.com/PyCQA/pycodestyle/issues/400 See also #10689; thanks @stepshal for first mentioning this issue and initial patches
This commit is contained in:
		| @@ -2491,6 +2491,7 @@ class _TreeBuilder(etree.TreeBuilder): | ||||
|     def doctype(self, name, pubid, system): | ||||
|         pass | ||||
|  | ||||
|  | ||||
| if sys.version_info[0] >= 3: | ||||
|     def compat_etree_fromstring(text): | ||||
|         return etree.XML(text, parser=etree.XMLParser(target=_TreeBuilder())) | ||||
| @@ -2787,6 +2788,7 @@ def workaround_optparse_bug9161(): | ||||
|             return real_add_option(self, *bargs, **bkwargs) | ||||
|         optparse.OptionGroup.add_option = _compat_add_option | ||||
|  | ||||
|  | ||||
| if hasattr(shutil, 'get_terminal_size'):  # Python >= 3.3 | ||||
|     compat_get_terminal_size = shutil.get_terminal_size | ||||
| else: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yen Chi Hsuan
					Yen Chi Hsuan