-
- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationperformance
Milestone
Description
Bug description
When passing an encoding
as a kwarg to open
, I get unspecified-encoding
thrown.
CSV_KWARGS = {"newline": "", "encoding": "utf-8"} with open("foo.csv", **CSV_KWARGS): pass
Configuration
No response
Command used
pylint --score=false a.py
Pylint output
************* Module quick_play a.py:2:5: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
Expected behavior
I think it would be cool if pylint
wouldn't throw unspecified-encoding
in this case.
Pylint version
pylint 2.17.4 astroid 2.15.4 Python 3.10.10 (main, Feb 19 2023, 17:57:18) [Clang 14.0.0 (clang-1400.0.29.102)]
OS / Environment
macOS Monterey v12.6
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationperformance