Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pylint/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from __future__ import annotations

import codecs
import os
import shutil
import subprocess
Expand Down Expand Up @@ -103,7 +102,7 @@ def generate(
os.close(pdot)
else:
dot_sourcepath = outputfile
with codecs.open(dot_sourcepath, "w", encoding="utf8") as file:
with open(dot_sourcepath, "w", encoding="utf8") as file:
file.write(self.source)
if target not in graphviz_extensions:
if shutil.which(self.renderer) is None:
Expand Down
3 changes: 1 addition & 2 deletions tests/pyreverse/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from __future__ import annotations

import codecs
import os
from collections.abc import Iterator, Sequence
from difflib import unified_diff
Expand Down Expand Up @@ -65,7 +64,7 @@ def __init__(self) -> None:

def _file_lines(path: str) -> list[str]:
# we don't care about the actual encoding, but python3 forces us to pick one
with codecs.open(path, encoding="latin1") as stream:
with open(path, encoding="latin1") as stream:
lines = [
line.strip()
for line in stream.readlines()
Expand Down
Loading