Skip to content

Commit

Permalink
fix type-annotation on .directory to match os.fspath() result
Browse files Browse the repository at this point in the history
graphviz/saving.py", line 39, in __init__:
Type annotation for directory does not match type of assignment [annotation-type-mismatch]
  Annotation: str
  Assignment: bytes
  In assignment of type: Union[bytes, str]
  • Loading branch information
xflr6 committed Jul 22, 2023
1 parent 521065a commit 9c723ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphviz/saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Save(encoding.Encoding, base.Base):
"""Save DOT source lines to file."""

directory: str = ''
directory: typing.Union[str, bytes] = ''

_default_extension = _defaults.DEFAULT_SOURCE_EXTENSION

Expand Down

0 comments on commit 9c723ad

Please sign in to comment.