Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flake8-logging] Add flake8_logging boilerplate and first rule LOG009 #7249

Merged
merged 8 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix license, docstring, violations strings
  • Loading branch information
qdegraaf committed Sep 11, 2023
commit 1dea2496da1f5690b32f2079e3ce7dae56526616
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ are:
SOFTWARE.
"""

- flake8-logging, license as follows:
- flake8-logging, licensed as follows:
"""
MIT License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::importer::ImportRequest;
use crate::registry::AsRule;

/// ## What it does
/// Checks for uses of `WARN`
/// Checks for uses of `logging.WARN`.
///
/// ## Why is this bad?
/// The WARN constant is an undocumented alias for WARNING. Whilst it’s not deprecated, it’s not
Expand All @@ -31,11 +31,11 @@ impl Violation for UndocumentedWarn {
const AUTOFIX: AutofixKind = AutofixKind::Sometimes;
#[derive_message_formats]
fn message(&self) -> String {
format!("Use of undocumented logging.WARN constant")
format!("Use of undocumented `logging.WARN` constant")
}

fn autofix_title(&self) -> Option<String> {
Some(format!("Replace logging.WARN with logging.WARNING"))
Some(format!("Replace `logging.WARN` with `logging.WARNING`"))
}
}

Expand Down
Loading