Skip to content

Commit

Permalink
Merge pull request #132 from melexis/warn-flags-unused
Browse files Browse the repository at this point in the history
Warn about ignored keyword arguments
  • Loading branch information
Letme authored Jan 17, 2024
2 parents 22e8ea9 + eb1db31 commit b05b162
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mlx/warnings/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ def warnings_wrapper(args):
if (not args.ignore) and (retval != 0):
return retval
else:
if args.flags:
print(f"WARNING: Some keyword arguments have been ignored because they followed positional arguments: "
f"{' '.join(args.flags)!r}")
retval = warnings_logfile(warnings, args.logfile)
if retval != 0:
return retval
Expand Down

0 comments on commit b05b162

Please sign in to comment.