mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
Add pyupgrade
This commit is contained in:
parent
a11d9314b2
commit
9cee71b5df
19 changed files with 33 additions and 29 deletions
|
|
@ -26,10 +26,10 @@ def lfs_files():
|
|||
assert mode in ('A', 'R')
|
||||
return filepart if mode == 'A' else filepart.split(' -> ')[1]
|
||||
|
||||
return set(
|
||||
return {
|
||||
to_file_part(mode, filepart) for mode, filepart in modes_and_fileparts
|
||||
if mode in ('A', 'R')
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
def find_large_added_files(filenames, maxkb):
|
||||
|
|
@ -41,7 +41,7 @@ def find_large_added_files(filenames, maxkb):
|
|||
for filename in filenames:
|
||||
kb = int(math.ceil(os.stat(filename).st_size / 1024))
|
||||
if kb > maxkb:
|
||||
print('{0} ({1} KB) exceeds {2} KB.'.format(filename, kb, maxkb))
|
||||
print('{} ({} KB) exceeds {} KB.'.format(filename, kb, maxkb))
|
||||
retv = 1
|
||||
|
||||
return retv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue