Cleanup issues identified by lgtm (#14459)
* cleanup issues identified by lgtm * fix the git_status check
This commit is contained in:
		
							parent
							
								
									5f38a98fa0
								
							
						
					
					
						commit
						fce9cb9338
					
				
					 17 changed files with 24 additions and 42 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,6 @@ import time
 | 
			
		|||
 | 
			
		||||
from math import floor
 | 
			
		||||
from os.path import dirname
 | 
			
		||||
from subprocess import Popen, PIPE, STDOUT
 | 
			
		||||
from blessings import Terminal
 | 
			
		||||
 | 
			
		||||
class Heatmap(object):
 | 
			
		||||
| 
						 | 
				
			
			@ -122,7 +121,6 @@ class Heatmap(object):
 | 
			
		|||
 | 
			
		||||
        for (c, r) in self.log:
 | 
			
		||||
            coords = self.coord(c, r)
 | 
			
		||||
            b, n = coords
 | 
			
		||||
            cap = self.max_cnt
 | 
			
		||||
            if cap == 0:
 | 
			
		||||
                cap = 1
 | 
			
		||||
| 
						 | 
				
			
			@ -302,7 +300,7 @@ def main(opts):
 | 
			
		|||
                        break
 | 
			
		||||
                    if not process_line(line, heatmaps, opts):
 | 
			
		||||
                        continue
 | 
			
		||||
        except:
 | 
			
		||||
        except Exception:
 | 
			
		||||
            pass
 | 
			
		||||
 | 
			
		||||
        stamped_log = open ("%s/stamped-log" % (out_dir), "a+")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,5 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
charmap = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -584,11 +584,6 @@ def unicode_macro_cases(config):
 | 
			
		|||
    for macro_id, uc_hex in config['unicode_macros'].items():
 | 
			
		||||
        hi = int(uc_hex, 16) >> 8
 | 
			
		||||
        lo = int(uc_hex, 16) & 0xFF
 | 
			
		||||
        unimacro_keys = ", ".join(
 | 
			
		||||
            "T({})".format(
 | 
			
		||||
                "KP_" + digit if digit.isdigit() else digit
 | 
			
		||||
            ) for digit in uc_hex
 | 
			
		||||
        )
 | 
			
		||||
        yield UNICODE_MACRO_TEMPLATE.format(
 | 
			
		||||
            macro_id=macro_id, hi=hi, lo=lo
 | 
			
		||||
        )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue