Skip to content

Commit

Permalink
Apply clang-format 18
Browse files Browse the repository at this point in the history
Summary: Previously this code conformed from clang-format 12.

Reviewed By: igorsugak

Differential Revision: D56065247

fbshipit-source-id: f5a985dd8f8b84f2f9e1818b3719b43c5a1b05b3
  • Loading branch information
zertosh authored and facebook-github-bot committed Apr 14, 2024
1 parent 8d09dc9 commit 2439fb9
Show file tree
Hide file tree
Showing 42 changed files with 141 additions and 155 deletions.
10 changes: 5 additions & 5 deletions scripts/tests/data/foo.almost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
*/
import argparse import fnmatch import os import regex import sys

class attrdict(dict) : __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__
class attrdict(dict) :__getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__

def parse_args() : parser = argparse.ArgumentParser(description = 'Update license headers') parser.add_argument('--header', default = 'license.header', help = 'header file') parser.add_argument('--extra', default = 30, help = 'extra characters past beginning of file to look for header') parser.add_argument('--editdist', default = 7, help = 'max edit distance between headers') parser.add_argument('--remove', default = False, action = "store_true", help = 'remove the header') parser.add_argument('--cslash', default = False, action = "store_true", help = 'use C slash "//" style comments') parser.add_argument('-v', default = False, action = "store_true", dest = "verbose", help = 'verbose output')
def parse_args() :parser = argparse.ArgumentParser(description = 'Update license headers') parser.add_argument('--header', default = 'license.header', help = 'header file') parser.add_argument('--extra', default = 30, help = 'extra characters past beginning of file to look for header') parser.add_argument('--editdist', default = 7, help = 'max edit distance between headers') parser.add_argument('--remove', default = False, action = "store_true", help = 'remove the header') parser.add_argument('--cslash', default = False, action = "store_true", help = 'use C slash "//" style comments') parser.add_argument('-v', default = False, action = "store_true", dest = "verbose", help = 'verbose output')

group = parser.add_mutually_exclusive_group() group.add_argument('-k', default = False, action = "store_true", dest = "check", help = 'check headers') group.add_argument('-i', default = False, action = "store_true", dest = "inplace", help = 'edit file inplace')
group = parser.add_mutually_exclusive_group() group.add_argument('-k', default = False, action = "store_true", dest = "check", help = 'check headers') group.add_argument('-i', default = False, action = "store_true", dest = "inplace", help = 'edit file inplace')

parser.add_argument('files', metavar = 'FILES', nargs = '+', help = 'files to process')
parser.add_argument('files', metavar = 'FILES', nargs = '+', help = 'files to process')

return parser.parse_args()
return parser.parse_args()
10 changes: 5 additions & 5 deletions scripts/tests/data/foo.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import argparse import fnmatch import os import regex import sys

class attrdict(dict) : __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__
class attrdict(dict) :__getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__

def parse_args() : parser = argparse.ArgumentParser(description = 'Update license headers') parser.add_argument('--header', default = 'license.header', help = 'header file') parser.add_argument('--extra', default = 30, help = 'extra characters past beginning of file to look for header') parser.add_argument('--editdist', default = 7, help = 'max edit distance between headers') parser.add_argument('--remove', default = False, action = "store_true", help = 'remove the header') parser.add_argument('--cslash', default = False, action = "store_true", help = 'use C slash "//" style comments') parser.add_argument('-v', default = False, action = "store_true", dest = "verbose", help = 'verbose output')
def parse_args() :parser = argparse.ArgumentParser(description = 'Update license headers') parser.add_argument('--header', default = 'license.header', help = 'header file') parser.add_argument('--extra', default = 30, help = 'extra characters past beginning of file to look for header') parser.add_argument('--editdist', default = 7, help = 'max edit distance between headers') parser.add_argument('--remove', default = False, action = "store_true", help = 'remove the header') parser.add_argument('--cslash', default = False, action = "store_true", help = 'use C slash "//" style comments') parser.add_argument('-v', default = False, action = "store_true", dest = "verbose", help = 'verbose output')

group = parser.add_mutually_exclusive_group() group.add_argument('-k', default = False, action = "store_true", dest = "check", help = 'check headers') group.add_argument('-i', default = False, action = "store_true", dest = "inplace", help = 'edit file inplace')
group = parser.add_mutually_exclusive_group() group.add_argument('-k', default = False, action = "store_true", dest = "check", help = 'check headers') group.add_argument('-i', default = False, action = "store_true", dest = "inplace", help = 'edit file inplace')

parser.add_argument('files', metavar = 'FILES', nargs = '+', help = 'files to process')
parser.add_argument('files', metavar = 'FILES', nargs = '+', help = 'files to process')

return parser.parse_args()
return parser.parse_args()
Loading

0 comments on commit 2439fb9

Please sign in to comment.