Skip to content

Commit

Permalink
Ignore pytype error (#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin committed Jul 24, 2023
1 parent 5abd50a commit 72c124d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stable_baselines3/common/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ def __init__(
mode = "w" if override_existing else "a"
# Prevent newline issue on Windows, see GH issue #692
self.file_handler = open(filename, f"{mode}t", newline="\n")
self.logger = csv.DictWriter(self.file_handler, fieldnames=("r", "l", "t", *extra_keys))
self.logger = csv.DictWriter(
self.file_handler, fieldnames=("r", "l", "t", *extra_keys)
) # pytype: disable=wrong-arg-types
if override_existing:
self.file_handler.write(f"#{json.dumps(header)}\n")
self.logger.writeheader()
Expand Down

0 comments on commit 72c124d

Please sign in to comment.