Skip to content

Commit 70ecc63

Browse files
authored
fix compatibility with Python 3.12 (#42)
`None.__ne__` does not work in Python 3.12 anymore.
1 parent bcbca9c commit 70ecc63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dargs/dargs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def gen_doc_flag(self, path: Optional[List[str]] = None, **kwargs) -> str:
900900
realdoc,
901901
targetdoc,
902902
]
903-
return "\n".join(filter(None.__ne__, allparts))
903+
return "\n".join([x for x in allparts if x is not None])
904904

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

0 commit comments

Comments
 (0)