Skip to content

Commit

Permalink
fix compatibility with Python 3.12 (#42)
Browse files Browse the repository at this point in the history
`None.__ne__` does not work in Python 3.12 anymore.
  • Loading branch information
njzjz authored Nov 1, 2023
1 parent bcbca9c commit 70ecc63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dargs/dargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ def gen_doc_flag(self, path: Optional[List[str]] = None, **kwargs) -> str:
realdoc,
targetdoc,
]
return "\n".join(filter(None.__ne__, allparts))
return "\n".join([x for x in allparts if x is not None])

def _make_cpath(
self, cname: str, path: Optional[List[str]] = None, showflag: bool = False
Expand Down

0 comments on commit 70ecc63

Please sign in to comment.