mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 20:42:10 +00:00
Implement the pylint rule PLW1514 (unspecified-encoding) (#7939)
## Summary Implemented the pylint rule W1514 ( unspecified-encoding). See also: https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/unspecified-encoding.html ## Test Plan Tested it with the submitted test case. Additionally, we tested the new ruff rule (PLW1514) on our proprietary Python code base.
This commit is contained in:
parent
bf0e5788ef
commit
73049df3ed
8 changed files with 281 additions and 0 deletions
|
|
@ -267,6 +267,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Pylint, "W1508") => (RuleGroup::Stable, rules::pylint::rules::InvalidEnvvarDefault),
|
||||
(Pylint, "W1509") => (RuleGroup::Stable, rules::pylint::rules::SubprocessPopenPreexecFn),
|
||||
(Pylint, "W1510") => (RuleGroup::Stable, rules::pylint::rules::SubprocessRunWithoutCheck),
|
||||
(Pylint, "W1514") => (RuleGroup::Preview, rules::pylint::rules::UnspecifiedEncoding),
|
||||
#[allow(deprecated)]
|
||||
(Pylint, "W1641") => (RuleGroup::Nursery, rules::pylint::rules::EqWithoutHash),
|
||||
(Pylint, "R0904") => (RuleGroup::Preview, rules::pylint::rules::TooManyPublicMethods),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue