diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-09-03 13:47:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-03 13:47:23 +0200 |
commit | baaa81a2994cdd517fbde8693b0a4b0a67f5a4e3 (patch) | |
tree | c8b26e345fb3c7377a6c8e3a2b7afca28e1806e5 /pylint/graph.py | |
parent | 0981d8bec52f0917168e0e89947fe164f58be683 (diff) | |
download | pylint-git-baaa81a2994cdd517fbde8693b0a4b0a67f5a4e3.tar.gz |
Refactor various typing related issues (#4940)
* Add type annotations to ``visit`` & ``leave`` calls
This adds typing to most calls that visit nodes. All other changes are
due to mypy errors resulting from introduction of typing.
* Fix outstanding mypy issues
This removes some of the `type: ignore` comments in favour of
solving the mypy issues these comments were surpressing.
* Fix remaining references to node_classes
Except for two references to node_classes in the changelog this should be the last of them
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/graph.py')
-rw-r--r-- | pylint/graph.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/graph.py b/pylint/graph.py index 927fac47e..a5e336226 100644 --- a/pylint/graph.py +++ b/pylint/graph.py @@ -109,8 +109,8 @@ class DotBackend: os.close(pdot) else: dot_sourcepath = outputfile - with codecs.open(dot_sourcepath, "w", encoding="utf8") as pdot: # type: ignore - pdot.write(self.source) # type: ignore + with codecs.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: raise RuntimeError( |