File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 9
9
10
10
from __future__ import annotations
11
11
12
- import codecs
13
12
import os
14
13
import shutil
15
14
import subprocess
@@ -103,7 +102,7 @@ def generate(
103
102
os .close (pdot )
104
103
else :
105
104
dot_sourcepath = outputfile
106
- with codecs . open (dot_sourcepath , "w" , encoding = "utf8" ) as file :
105
+ with open (dot_sourcepath , "w" , encoding = "utf8" ) as file :
107
106
file .write (self .source )
108
107
if target not in graphviz_extensions :
109
108
if shutil .which (self .renderer ) is None :
Original file line number Diff line number Diff line change 6
6
7
7
from __future__ import annotations
8
8
9
- import codecs
10
9
import os
11
10
from collections .abc import Iterator , Sequence
12
11
from difflib import unified_diff
@@ -65,7 +64,7 @@ def __init__(self) -> None:
65
64
66
65
def _file_lines (path : str ) -> list [str ]:
67
66
# we don't care about the actual encoding, but python3 forces us to pick one
68
- with codecs . open (path , encoding = "latin1" ) as stream :
67
+ with open (path , encoding = "latin1" ) as stream :
69
68
lines = [
70
69
line .strip ()
71
70
for line in stream .readlines ()
You can’t perform that action at this time.
0 commit comments