diff options
author | Gideon <87426140+GideonBear@users.noreply.github.com> | 2022-12-21 20:38:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 20:38:26 +0100 |
commit | 2ae0e98454c28e2aaf1c892655f34eb8d19772d7 (patch) | |
tree | 37e1c5fa92343ed4d847b8fe96fc6ec2d59dccf5 /pylint | |
parent | 71baf6a62617ee62aadc7513aae63c829cb8fda5 (diff) | |
download | pylint-git-2ae0e98454c28e2aaf1c892655f34eb8d19772d7.tar.gz |
``consider-using-with`` now triggers for ``pathlib.Path.open`` (#7968)
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/checkers/refactoring/refactoring_checker.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pylint/checkers/refactoring/refactoring_checker.py b/pylint/checkers/refactoring/refactoring_checker.py index 361238592..4735c9e17 100644 --- a/pylint/checkers/refactoring/refactoring_checker.py +++ b/pylint/checkers/refactoring/refactoring_checker.py @@ -49,6 +49,7 @@ CALLS_THAT_COULD_BE_REPLACED_BY_WITH = frozenset( CALLS_RETURNING_CONTEXT_MANAGERS = frozenset( ( "_io.open", # regular 'open()' call + "pathlib.Path.open", "codecs.open", "urllib.request.urlopen", "tempfile.NamedTemporaryFile", |