Skip to content

Commit

Permalink
find_kwargs: Add parameters to limit verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Jan 17, 2024
1 parent a672a93 commit 7539dec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion find_kwargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def visit_Call(self, node):
if (isinstance(arg.value, ast.Name) and
# arg.value.ctx is Load # can't imagine how it would be otherwise
arg.value.id == arg.arg):
print("%s:%d:%d: %s(%s=%s)" % (
if "-q" not in sys.argv: print("%s:%d:%d: %s(%s=%s)" % (
fn, node.lineno, node.col_offset,
ast.unparse(node.func), arg.arg, arg.arg
))
Expand All @@ -33,6 +33,7 @@ def visit_Call(self, node):
for fn in files:
if fn.endswith(".py"):
fn = os.path.join(root, fn)
if "--no-test" in sys.argv and "test" in fn: continue
with open(fn, "rb") as f:
data = f.read()
try:
Expand Down

0 comments on commit 7539dec

Please sign in to comment.