Skip to content

Commit

Permalink
Revert "check beforehand if iterable None"
Browse files Browse the repository at this point in the history
This reverts commit 799e755.
  • Loading branch information
dantp-ai committed Jan 1, 2024
1 parent 799e755 commit 2d3c637
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tianshou/utils/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,9 @@ def mklist(x: Any) -> list[str]:
exclude_exceptions = mklist(exclude_exceptions)

def is_excluded(k: Any) -> bool:
if (include_forced and k in include_forced) or (
exclude_exceptions and k in exclude_exceptions
):
if k in include_forced or k in exclude_exceptions:
return False
if exclude and k in exclude:
if k in exclude:
return True
if self._tostring_exclude_private():
return k.startswith("_")
Expand Down

0 comments on commit 2d3c637

Please sign in to comment.