Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74903f23d6 | ||
|
|
3ee20a70d3 | ||
|
|
4c2fbb7ac0 | ||
|
|
7a66f98590 | ||
|
|
a2bf3916f3 | ||
|
|
c9aa7b9308 | ||
|
|
d880ca6cc6 | ||
|
|
080f99b908 | ||
|
|
a7dc491ff1 | ||
|
|
cdc8f8c91a | ||
|
|
138c46e793 | ||
|
|
a86c57a832 |
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
@@ -40,8 +40,7 @@ jobs:
|
||||
- run: git diff --quiet README.md || echo "::error file=README.md::This file is outdated. Run 'cargo +nightly dev generate-all'."
|
||||
- run: git diff --quiet src/checks_gen.rs || echo "::error file=src/checks_gen.rs::This file is outdated. Run 'cargo +nightly dev generate-all'."
|
||||
- run: git diff --quiet ruff.schema.json || echo "::error file=ruff.schema.json::This file is outdated. Run 'cargo +nightly dev generate-all'."
|
||||
- run: git diff --quiet playground/src/ruff_options.ts || echo "::error file=playground/src/ruff_options.ts::This file is outdated. Run 'cargo +nightly dev generate-all'."
|
||||
- run: git diff --exit-code -- README.md src/checks_gen.rs ruff.schema.json playground/src/ruff_options.ts
|
||||
- run: git diff --exit-code -- README.md src/checks_gen.rs ruff.schema.json
|
||||
|
||||
cargo-fmt:
|
||||
name: "cargo fmt"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.202
|
||||
rev: v0.0.203
|
||||
hooks:
|
||||
- id: ruff
|
||||
|
||||
|
||||
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -750,7 +750,7 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
||||
|
||||
[[package]]
|
||||
name = "flake8-to-ruff"
|
||||
version = "0.0.202-dev.0"
|
||||
version = "0.0.203-dev.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap 4.0.32",
|
||||
@@ -1878,7 +1878,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
dependencies = [
|
||||
"annotate-snippets 0.9.1",
|
||||
"anyhow",
|
||||
@@ -1946,7 +1946,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff_dev"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap 4.0.32",
|
||||
@@ -1967,7 +1967,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff_macros"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
@@ -6,7 +6,7 @@ members = [
|
||||
|
||||
[package]
|
||||
name = "ruff"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
authors = ["Charlie Marsh <charlie.r.marsh@gmail.com>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.65.0"
|
||||
@@ -51,7 +51,7 @@ path-absolutize = { version = "3.0.14", features = ["once_cell_cache", "use_unix
|
||||
quick-junit = { version = "0.3.2" }
|
||||
regex = { version = "1.6.0" }
|
||||
ropey = { version = "1.5.0", features = ["cr_lines", "simd"], default-features = false }
|
||||
ruff_macros = { version = "0.0.202", path = "ruff_macros" }
|
||||
ruff_macros = { version = "0.0.203", path = "ruff_macros" }
|
||||
rustc-hash = { version = "1.1.0" }
|
||||
rustpython-ast = { features = ["unparse"], git = "https://github.com/RustPython/RustPython.git", rev = "68d26955b3e24198a150315e7959719b03709dee" }
|
||||
rustpython-common = { git = "https://github.com/RustPython/RustPython.git", rev = "68d26955b3e24198a150315e7959719b03709dee" }
|
||||
|
||||
28
README.md
28
README.md
@@ -169,7 +169,7 @@ Ruff also works with [pre-commit](https://pre-commit.com):
|
||||
```yaml
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: 'v0.0.202'
|
||||
rev: 'v0.0.203'
|
||||
hooks:
|
||||
- id: ruff
|
||||
# Respect `exclude` and `extend-exclude` settings.
|
||||
@@ -300,6 +300,7 @@ ruff path/to/code/ --select F401 --select F403
|
||||
|
||||
See `ruff --help` for more:
|
||||
|
||||
<!-- Begin auto-generated cli help. -->
|
||||
```shell
|
||||
Ruff: An extremely fast Python linter.
|
||||
|
||||
@@ -349,6 +350,10 @@ Options:
|
||||
List of mappings from file pattern to code to exclude
|
||||
--format <FORMAT>
|
||||
Output serialization format for error messages [possible values: text, json, junit, grouped, github, gitlab]
|
||||
--stdin-filename <STDIN_FILENAME>
|
||||
The name of the file when passing it through stdin
|
||||
--cache-dir <CACHE_DIR>
|
||||
Path to the cache directory
|
||||
--show-source
|
||||
Show violations with source code
|
||||
--respect-gitignore
|
||||
@@ -357,12 +362,6 @@ Options:
|
||||
Enforce exclusions, even for paths passed to Ruff directly on the command-line
|
||||
--update-check
|
||||
Enable or disable automatic update checks
|
||||
--show-files
|
||||
See the files Ruff will be run against with the current settings
|
||||
--show-settings
|
||||
See the settings Ruff will use to check a given Python file
|
||||
--add-noqa
|
||||
Enable automatic additions of `noqa` directives to failing lines
|
||||
--dummy-variable-rgx <DUMMY_VARIABLE_RGX>
|
||||
Regular expression matching the name of dummy variables
|
||||
--target-version <TARGET_VERSION>
|
||||
@@ -371,17 +370,23 @@ Options:
|
||||
Set the line-length for length-associated checks and automatic formatting
|
||||
--max-complexity <MAX_COMPLEXITY>
|
||||
Maximum McCabe complexity allowed for a given function
|
||||
--stdin-filename <STDIN_FILENAME>
|
||||
The name of the file when passing it through stdin
|
||||
--add-noqa
|
||||
Enable automatic additions of `noqa` directives to failing lines
|
||||
--clean
|
||||
Clear any caches in the current directory or any subdirectories
|
||||
--explain <EXPLAIN>
|
||||
Explain a rule
|
||||
--cache-dir <CACHE_DIR>
|
||||
Path to the cache directory
|
||||
--show-files
|
||||
See the files Ruff will be run against with the current settings
|
||||
--show-settings
|
||||
See the settings Ruff will use to check a given Python file
|
||||
-h, --help
|
||||
Print help information
|
||||
-V, --version
|
||||
Print version information
|
||||
|
||||
```
|
||||
<!-- End auto-generated cli help. -->
|
||||
|
||||
### `pyproject.toml` discovery
|
||||
|
||||
@@ -1669,7 +1674,6 @@ Summary
|
||||
|
||||
<!-- Sections automatically generated by `cargo dev generate-options`. -->
|
||||
<!-- Begin auto-generated options sections. -->
|
||||
|
||||
#### [`allowed-confusables`](#allowed-confusables)
|
||||
|
||||
A list of allowed "confusable" Unicode characters to ignore when
|
||||
|
||||
4
flake8_to_ruff/Cargo.lock
generated
4
flake8_to_ruff/Cargo.lock
generated
@@ -771,7 +771,7 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
||||
|
||||
[[package]]
|
||||
name = "flake8_to_ruff"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@@ -1975,7 +1975,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "flake8-to-ruff"
|
||||
version = "0.0.202-dev.0"
|
||||
version = "0.0.203-dev.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
|
||||
1
resources/test/fixtures/isort/line_ending_cr.py
vendored
Normal file
1
resources/test/fixtures/isort/line_ending_cr.py
vendored
Normal file
@@ -0,0 +1 @@
|
||||
from long_module_name import member_one, member_two, member_three, member_four, member_five
|
||||
2
resources/test/fixtures/isort/line_ending_crlf.py
vendored
Normal file
2
resources/test/fixtures/isort/line_ending_crlf.py
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
from long_module_name import member_one, member_two, member_three, member_four, member_five
|
||||
|
||||
2
resources/test/fixtures/isort/line_ending_lf.py
vendored
Normal file
2
resources/test/fixtures/isort/line_ending_lf.py
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
from long_module_name import member_one, member_two, member_three, member_four, member_five
|
||||
|
||||
68
resources/test/fixtures/pyflakes/F401_7.py
vendored
68
resources/test/fixtures/pyflakes/F401_7.py
vendored
@@ -1,16 +1,66 @@
|
||||
"""Test: noqa directives."""
|
||||
|
||||
from module import (
|
||||
A, # noqa: F401
|
||||
B,
|
||||
# This should ignore both errors.
|
||||
from typing import ( # noqa: F401
|
||||
List,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
from module import (
|
||||
A, # noqa: F401
|
||||
B, # noqa: F401
|
||||
# This should ignore both errors.
|
||||
from typing import ( # noqa
|
||||
List,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
from module import (
|
||||
A,
|
||||
B,
|
||||
# This should ignore both errors.
|
||||
from typing import (
|
||||
List, # noqa: F401
|
||||
Sequence, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import (
|
||||
List, # noqa
|
||||
Sequence, # noqa
|
||||
)
|
||||
|
||||
# This should ignore the first error.
|
||||
from typing import (
|
||||
Mapping, # noqa: F401
|
||||
Union,
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import ( # noqa
|
||||
List,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
# This should ignore the error, but the inner noqa should be marked as unused.
|
||||
from typing import ( # noqa: F401
|
||||
Optional, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore the error, but the inner noqa should be marked as unused.
|
||||
from typing import ( # noqa
|
||||
Optional, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore the error, but mark F501 as unused.
|
||||
from typing import ( # noqa: F401
|
||||
Dict, # noqa: F501
|
||||
)
|
||||
|
||||
# This should ignore the error, but mark F501 as unused.
|
||||
from typing import ( # noqa: F501
|
||||
Tuple, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import Any, AnyStr # noqa: F401
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import AsyncIterable, AsyncGenerator # noqa
|
||||
|
||||
# This should mark F501 as unused.
|
||||
from typing import Awaitable, AwaitableGenerator # noqa: F501
|
||||
|
||||
64
resources/test/fixtures/ruff/RUF100_1.py
vendored
Normal file
64
resources/test/fixtures/ruff/RUF100_1.py
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
# This should ignore both errors.
|
||||
from typing import ( # noqa: F401
|
||||
List,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import ( # noqa
|
||||
List,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import (
|
||||
List, # noqa: F401
|
||||
Sequence, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import (
|
||||
List, # noqa
|
||||
Sequence, # noqa
|
||||
)
|
||||
|
||||
# This should ignore the first error.
|
||||
from typing import (
|
||||
Mapping, # noqa: F401
|
||||
Union,
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import ( # noqa
|
||||
List,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
# This should ignore the error, but the inner noqa should be marked as unused.
|
||||
from typing import ( # noqa: F401
|
||||
Optional, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore the error, but the inner noqa should be marked as unused.
|
||||
from typing import ( # noqa
|
||||
Optional, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore the error, but mark F501 as unused.
|
||||
from typing import ( # noqa: F401
|
||||
Dict, # noqa: F501
|
||||
)
|
||||
|
||||
# This should ignore the error, but mark F501 as unused.
|
||||
from typing import ( # noqa: F501
|
||||
Tuple, # noqa: F401
|
||||
)
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import Any, AnyStr # noqa: F401
|
||||
|
||||
# This should ignore both errors.
|
||||
from typing import AsyncIterable, AsyncGenerator # noqa
|
||||
|
||||
# This should mark F501 as unused.
|
||||
from typing import Awaitable, AwaitableGenerator # noqa: F501
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ruff_dev"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -4,7 +4,8 @@ use anyhow::Result;
|
||||
use clap::Args;
|
||||
|
||||
use crate::{
|
||||
generate_check_code_prefix, generate_json_schema, generate_options, generate_rules_table,
|
||||
generate_check_code_prefix, generate_cli_help, generate_json_schema, generate_options,
|
||||
generate_rules_table,
|
||||
};
|
||||
|
||||
#[derive(Args)]
|
||||
@@ -27,5 +28,8 @@ pub fn main(cli: &Cli) -> Result<()> {
|
||||
generate_options::main(&generate_options::Cli {
|
||||
dry_run: cli.dry_run,
|
||||
})?;
|
||||
generate_cli_help::main(&generate_cli_help::Cli {
|
||||
dry_run: cli.dry_run,
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
34
ruff_dev/src/generate_cli_help.rs
Normal file
34
ruff_dev/src/generate_cli_help.rs
Normal file
@@ -0,0 +1,34 @@
|
||||
//! Generate CLI help.
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::{Args, CommandFactory};
|
||||
use ruff::cli::Cli as MainCli;
|
||||
|
||||
use crate::utils::replace_readme_section;
|
||||
|
||||
const HELP_BEGIN_PRAGMA: &str = "<!-- Begin auto-generated cli help. -->";
|
||||
const HELP_END_PRAGMA: &str = "<!-- End auto-generated cli help. -->";
|
||||
|
||||
#[derive(Args)]
|
||||
pub struct Cli {
|
||||
/// Write the generated help to stdout (rather than to `README.md`).
|
||||
#[arg(long)]
|
||||
pub(crate) dry_run: bool,
|
||||
}
|
||||
|
||||
pub fn main(cli: &Cli) -> Result<()> {
|
||||
let mut cmd = MainCli::command();
|
||||
let output = cmd.render_help().to_string();
|
||||
|
||||
if cli.dry_run {
|
||||
print!("{output}");
|
||||
} else {
|
||||
replace_readme_section(
|
||||
&format!("```shell\n{output}\n```\n"),
|
||||
HELP_BEGIN_PRAGMA,
|
||||
HELP_END_PRAGMA,
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
//! Generate a Markdown-compatible listing of configuration options.
|
||||
|
||||
use std::fs;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Args;
|
||||
use itertools::Itertools;
|
||||
use ruff::settings::options::Options;
|
||||
use ruff::settings::options_base::{ConfigurationOptions, OptionEntry, OptionField};
|
||||
|
||||
use crate::utils::replace_readme_section;
|
||||
|
||||
const BEGIN_PRAGMA: &str = "<!-- Begin auto-generated options sections. -->";
|
||||
const END_PRAGMA: &str = "<!-- End auto-generated options sections. -->";
|
||||
|
||||
@@ -95,30 +92,7 @@ pub fn main(cli: &Cli) -> Result<()> {
|
||||
if cli.dry_run {
|
||||
print!("{output}");
|
||||
} else {
|
||||
// Read the existing file.
|
||||
let file = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.expect("Failed to find root directory")
|
||||
.join("README.md");
|
||||
let existing = fs::read_to_string(&file)?;
|
||||
|
||||
// Extract the prefix.
|
||||
let index = existing
|
||||
.find(BEGIN_PRAGMA)
|
||||
.expect("Unable to find begin pragma");
|
||||
let prefix = &existing[..index + BEGIN_PRAGMA.len()];
|
||||
|
||||
// Extract the suffix.
|
||||
let index = existing
|
||||
.find(END_PRAGMA)
|
||||
.expect("Unable to find end pragma");
|
||||
let suffix = &existing[index..];
|
||||
|
||||
// Write the prefix, new contents, and suffix.
|
||||
let mut f = OpenOptions::new().write(true).truncate(true).open(&file)?;
|
||||
write!(f, "{prefix}\n\n")?;
|
||||
write!(f, "{output}")?;
|
||||
write!(f, "{suffix}")?;
|
||||
replace_readme_section(&output, BEGIN_PRAGMA, END_PRAGMA)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
//! Generate a Markdown-compatible table of supported lint rules.
|
||||
|
||||
use std::fs;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Args;
|
||||
use itertools::Itertools;
|
||||
use ruff::checks::{CheckCategory, CheckCode};
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::utils::replace_readme_section;
|
||||
|
||||
const TABLE_BEGIN_PRAGMA: &str = "<!-- Begin auto-generated sections. -->";
|
||||
const TABLE_END_PRAGMA: &str = "<!-- End auto-generated sections. -->";
|
||||
|
||||
@@ -85,32 +82,3 @@ pub fn main(cli: &Cli) -> Result<()> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn replace_readme_section(content: &str, begin_pragma: &str, end_pragma: &str) -> Result<()> {
|
||||
// Read the existing file.
|
||||
let file = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.expect("Failed to find root directory")
|
||||
.join("README.md");
|
||||
let existing = fs::read_to_string(&file)?;
|
||||
|
||||
// Extract the prefix.
|
||||
let index = existing
|
||||
.find(begin_pragma)
|
||||
.expect("Unable to find begin pragma");
|
||||
let prefix = &existing[..index + begin_pragma.len()];
|
||||
|
||||
// Extract the suffix.
|
||||
let index = existing
|
||||
.find(end_pragma)
|
||||
.expect("Unable to find end pragma");
|
||||
let suffix = &existing[index..];
|
||||
|
||||
// Write the prefix, new contents, and suffix.
|
||||
let mut f = OpenOptions::new().write(true).truncate(true).open(&file)?;
|
||||
writeln!(f, "{prefix}")?;
|
||||
write!(f, "{content}")?;
|
||||
write!(f, "{suffix}")?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
pub mod generate_all;
|
||||
pub mod generate_check_code_prefix;
|
||||
pub mod generate_cli_help;
|
||||
pub mod generate_json_schema;
|
||||
pub mod generate_options;
|
||||
pub mod generate_rules_table;
|
||||
@@ -20,3 +21,4 @@ pub mod print_ast;
|
||||
pub mod print_cst;
|
||||
pub mod print_tokens;
|
||||
pub mod round_trip;
|
||||
mod utils;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
use anyhow::Result;
|
||||
use clap::{Parser, Subcommand};
|
||||
use ruff_dev::{
|
||||
generate_all, generate_check_code_prefix, generate_json_schema, generate_options,
|
||||
generate_rules_table, print_ast, print_cst, print_tokens, round_trip,
|
||||
generate_all, generate_check_code_prefix, generate_cli_help, generate_json_schema,
|
||||
generate_options, generate_rules_table, print_ast, print_cst, print_tokens, round_trip,
|
||||
};
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -38,6 +38,8 @@ enum Commands {
|
||||
GenerateRulesTable(generate_rules_table::Cli),
|
||||
/// Generate a Markdown-compatible listing of configuration options.
|
||||
GenerateOptions(generate_options::Cli),
|
||||
/// Generate CLI help.
|
||||
GenerateCliHelp(generate_cli_help::Cli),
|
||||
/// Print the AST for a given Python file.
|
||||
PrintAST(print_ast::Cli),
|
||||
/// Print the LibCST CST for a given Python file.
|
||||
@@ -56,6 +58,7 @@ fn main() -> Result<()> {
|
||||
Commands::GenerateJSONSchema(args) => generate_json_schema::main(args)?,
|
||||
Commands::GenerateRulesTable(args) => generate_rules_table::main(args)?,
|
||||
Commands::GenerateOptions(args) => generate_options::main(args)?,
|
||||
Commands::GenerateCliHelp(args) => generate_cli_help::main(args)?,
|
||||
Commands::PrintAST(args) => print_ast::main(args)?,
|
||||
Commands::PrintCST(args) => print_cst::main(args)?,
|
||||
Commands::PrintTokens(args) => print_tokens::main(args)?,
|
||||
|
||||
35
ruff_dev/src/utils.rs
Normal file
35
ruff_dev/src/utils.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use std::fs;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
pub fn replace_readme_section(content: &str, begin_pragma: &str, end_pragma: &str) -> Result<()> {
|
||||
// Read the existing file.
|
||||
let file = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.expect("Failed to find root directory")
|
||||
.join("README.md");
|
||||
let existing = fs::read_to_string(&file)?;
|
||||
|
||||
// Extract the prefix.
|
||||
let index = existing
|
||||
.find(begin_pragma)
|
||||
.expect("Unable to find begin pragma");
|
||||
let prefix = &existing[..index + begin_pragma.len()];
|
||||
|
||||
// Extract the suffix.
|
||||
let index = existing
|
||||
.find(end_pragma)
|
||||
.expect("Unable to find end pragma");
|
||||
let suffix = &existing[index..];
|
||||
|
||||
// Write the prefix, new contents, and suffix.
|
||||
let mut f = OpenOptions::new().write(true).truncate(true).open(&file)?;
|
||||
writeln!(f, "{prefix}")?;
|
||||
write!(f, "{content}")?;
|
||||
write!(f, "{suffix}")?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ruff_macros"
|
||||
version = "0.0.202"
|
||||
version = "0.0.203"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
|
||||
@@ -15,8 +15,9 @@ use serde::{Deserialize, Serialize};
|
||||
use crate::message::Message;
|
||||
use crate::settings::{flags, Settings};
|
||||
|
||||
static CACHE_DIR: Lazy<Option<String>> = Lazy::new(|| std::env::var("RUFF_CACHE_DIR").ok());
|
||||
const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
static CACHE_DIR: Lazy<Option<String>> = Lazy::new(|| std::env::var("RUFF_CACHE_DIR").ok());
|
||||
pub const DEFAULT_CACHE_DIR_NAME: &str = ".ruff_cache";
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct CacheMetadata {
|
||||
@@ -40,7 +41,7 @@ struct CheckResult {
|
||||
pub fn cache_dir(project_root: &Path) -> PathBuf {
|
||||
CACHE_DIR
|
||||
.as_ref()
|
||||
.map_or_else(|| project_root.join(".ruff_cache"), PathBuf::from)
|
||||
.map_or_else(|| project_root.join(DEFAULT_CACHE_DIR_NAME), PathBuf::from)
|
||||
}
|
||||
|
||||
fn content_dir() -> &'static Path {
|
||||
|
||||
@@ -2397,7 +2397,7 @@ where
|
||||
}
|
||||
}
|
||||
if self.settings.enabled.contains(&CheckCode::UP025) {
|
||||
pyupgrade::plugins::rewrite_unicode_literal(self, expr, value, kind);
|
||||
pyupgrade::plugins::rewrite_unicode_literal(self, expr, kind);
|
||||
}
|
||||
}
|
||||
ExprKind::Lambda { args, body, .. } => {
|
||||
@@ -3673,7 +3673,22 @@ impl<'a> Checker<'a> {
|
||||
|
||||
let defined_by = binding.source.as_ref().unwrap();
|
||||
let defined_in = self.child_to_parent.get(defined_by);
|
||||
if self.is_ignored(&CheckCode::F401, binding.range.location.row()) {
|
||||
let child = defined_by.0;
|
||||
|
||||
let check_lineno = binding.range.location.row();
|
||||
let parent_lineno = if matches!(child.node, StmtKind::ImportFrom { .. })
|
||||
&& child.location.row() != check_lineno
|
||||
{
|
||||
Some(child.location.row())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
if self.is_ignored(&CheckCode::F401, check_lineno)
|
||||
|| parent_lineno.map_or(false, |parent_lineno| {
|
||||
self.is_ignored(&CheckCode::F401, parent_lineno)
|
||||
})
|
||||
{
|
||||
ignored
|
||||
.entry((defined_by, defined_in))
|
||||
.or_default()
|
||||
@@ -3725,21 +3740,33 @@ impl<'a> Checker<'a> {
|
||||
CheckKind::UnusedImport(full_name.clone(), ignore_init),
|
||||
*range,
|
||||
);
|
||||
if matches!(child.node, StmtKind::ImportFrom { .. })
|
||||
&& child.location.row() != range.location.row()
|
||||
{
|
||||
check.parent(child.location);
|
||||
}
|
||||
if let Some(fix) = fix.as_ref() {
|
||||
check.amend(fix.clone());
|
||||
}
|
||||
checks.push(check);
|
||||
}
|
||||
}
|
||||
for (_, unused_imports) in ignored
|
||||
for ((defined_by, ..), unused_imports) in ignored
|
||||
.into_iter()
|
||||
.sorted_by_key(|((defined_by, _), _)| defined_by.0.location)
|
||||
{
|
||||
let child = defined_by.0;
|
||||
for (full_name, range) in unused_imports {
|
||||
checks.push(Check::new(
|
||||
let mut check = Check::new(
|
||||
CheckKind::UnusedImport(full_name.clone(), ignore_init),
|
||||
*range,
|
||||
));
|
||||
);
|
||||
if matches!(child.node, StmtKind::ImportFrom { .. })
|
||||
&& child.location.row() != range.location.row()
|
||||
{
|
||||
check.parent(child.location);
|
||||
}
|
||||
checks.push(check);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,11 +11,13 @@ use crate::isort;
|
||||
use crate::isort::track::ImportTracker;
|
||||
use crate::settings::{flags, Settings};
|
||||
use crate::source_code_locator::SourceCodeLocator;
|
||||
use crate::source_code_style::SourceCodeStyleDetector;
|
||||
|
||||
fn check_import_blocks(
|
||||
tracker: ImportTracker,
|
||||
locator: &SourceCodeLocator,
|
||||
settings: &Settings,
|
||||
stylist: &SourceCodeStyleDetector,
|
||||
autofix: flags::Autofix,
|
||||
package: Option<&Path>,
|
||||
) -> Vec<Check> {
|
||||
@@ -23,7 +25,7 @@ fn check_import_blocks(
|
||||
for block in tracker.into_iter() {
|
||||
if !block.imports.is_empty() {
|
||||
if let Some(check) =
|
||||
isort::plugins::check_imports(&block, locator, settings, autofix, package)
|
||||
isort::plugins::check_imports(&block, locator, settings, stylist, autofix, package)
|
||||
{
|
||||
checks.push(check);
|
||||
}
|
||||
@@ -32,11 +34,13 @@ fn check_import_blocks(
|
||||
checks
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn check_imports(
|
||||
python_ast: &Suite,
|
||||
locator: &SourceCodeLocator,
|
||||
directives: &IsortDirectives,
|
||||
settings: &Settings,
|
||||
stylist: &SourceCodeStyleDetector,
|
||||
autofix: flags::Autofix,
|
||||
path: &Path,
|
||||
package: Option<&Path>,
|
||||
@@ -45,5 +49,5 @@ pub fn check_imports(
|
||||
for stmt in python_ast {
|
||||
tracker.visit_stmt(stmt);
|
||||
}
|
||||
check_import_blocks(tracker, locator, settings, autofix, package)
|
||||
check_import_blocks(tracker, locator, settings, stylist, autofix, package)
|
||||
}
|
||||
|
||||
@@ -25,12 +25,6 @@ pub fn check_noqa(
|
||||
|
||||
let enforce_noqa = settings.enabled.contains(&CheckCode::RUF100);
|
||||
|
||||
checks.sort_by_key(|check| check.location);
|
||||
let mut checks_iter = checks.iter().enumerate().peekable();
|
||||
if let Some((_index, check)) = checks_iter.peek() {
|
||||
assert!(check.location.row() >= 1);
|
||||
}
|
||||
|
||||
let lines: Vec<&str> = contents.lines().collect();
|
||||
for lineno in commented_lines {
|
||||
// If we hit an exemption for the entire file, bail.
|
||||
@@ -44,20 +38,18 @@ pub fn check_noqa(
|
||||
.entry(lineno - 1)
|
||||
.or_insert_with(|| (noqa::extract_noqa_directive(lines[lineno - 1]), vec![]));
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any ignored checks.
|
||||
while let Some((index, check)) =
|
||||
checks_iter.next_if(|(_index, check)| check.location.row() <= *lineno)
|
||||
{
|
||||
if check.kind == CheckKind::BlanketNOQA {
|
||||
continue;
|
||||
}
|
||||
// Grab the noqa (logical) line number for the current (physical) line.
|
||||
// If there are newlines at the end of the file, they won't be represented in
|
||||
// `noqa_line_for`, so fallback to the current line.
|
||||
let check_lineno = check.location.row();
|
||||
let noqa_lineno = noqa_line_for.get(&check_lineno).unwrap_or(&check_lineno);
|
||||
if noqa_lineno == lineno {
|
||||
// Remove any ignored checks.
|
||||
for (index, check) in checks.iter().enumerate() {
|
||||
if check.kind == CheckKind::BlanketNOQA {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Is the check ignored by a `noqa` directive on the parent line?
|
||||
if let Some(parent_lineno) = check.parent.map(|location| location.row()) {
|
||||
let noqa_lineno = noqa_line_for.get(&parent_lineno).unwrap_or(&parent_lineno);
|
||||
if commented_lines.contains(noqa_lineno) {
|
||||
let noqa = noqa_directives.entry(noqa_lineno - 1).or_insert_with(|| {
|
||||
(noqa::extract_noqa_directive(lines[noqa_lineno - 1]), vec![])
|
||||
});
|
||||
@@ -65,17 +57,41 @@ pub fn check_noqa(
|
||||
(Directive::All(..), matches) => {
|
||||
matches.push(check.kind.code().as_ref());
|
||||
ignored.push(index);
|
||||
continue;
|
||||
}
|
||||
(Directive::Codes(.., codes), matches) => {
|
||||
if noqa::includes(check.kind.code(), codes) {
|
||||
matches.push(check.kind.code().as_ref());
|
||||
ignored.push(index);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
(Directive::None, ..) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the check ignored by a `noqa` directive on the same line?
|
||||
let check_lineno = check.location.row();
|
||||
let noqa_lineno = noqa_line_for.get(&check_lineno).unwrap_or(&check_lineno);
|
||||
if commented_lines.contains(noqa_lineno) {
|
||||
let noqa = noqa_directives
|
||||
.entry(noqa_lineno - 1)
|
||||
.or_insert_with(|| (noqa::extract_noqa_directive(lines[noqa_lineno - 1]), vec![]));
|
||||
match noqa {
|
||||
(Directive::All(..), matches) => {
|
||||
matches.push(check.kind.code().as_ref());
|
||||
ignored.push(index);
|
||||
}
|
||||
(Directive::Codes(.., codes), matches) => {
|
||||
if noqa::includes(check.kind.code(), codes) {
|
||||
matches.push(check.kind.code().as_ref());
|
||||
ignored.push(index);
|
||||
}
|
||||
}
|
||||
(Directive::None, ..) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Enforce that the noqa directive was actually used (RUF100).
|
||||
|
||||
@@ -3190,6 +3190,7 @@ pub struct Check {
|
||||
pub location: Location,
|
||||
pub end_location: Location,
|
||||
pub fix: Option<Fix>,
|
||||
pub parent: Option<Location>,
|
||||
}
|
||||
|
||||
impl Check {
|
||||
@@ -3199,11 +3200,18 @@ impl Check {
|
||||
location: range.location,
|
||||
end_location: range.end_location,
|
||||
fix: None,
|
||||
parent: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn amend(&mut self, fix: Fix) {
|
||||
pub fn amend(&mut self, fix: Fix) -> &mut Self {
|
||||
self.fix = Some(fix);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn parent(&mut self, parent: Location) -> &mut Self {
|
||||
self.parent = Some(parent);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
120
src/cli.rs
120
src/cli.rs
@@ -17,7 +17,7 @@ use crate::settings::types::{
|
||||
#[command(version)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct Cli {
|
||||
#[arg(required_unless_present_any = ["explain", "generate_shell_completion"])]
|
||||
#[arg(required_unless_present_any = ["clean", "explain", "generate_shell_completion"])]
|
||||
pub files: Vec<PathBuf>,
|
||||
/// Path to the `pyproject.toml` or `ruff.toml` file to use for
|
||||
/// configuration.
|
||||
@@ -93,6 +93,12 @@ pub struct Cli {
|
||||
/// Output serialization format for error messages.
|
||||
#[arg(long, value_enum)]
|
||||
pub format: Option<SerializationFormat>,
|
||||
/// The name of the file when passing it through stdin.
|
||||
#[arg(long)]
|
||||
pub stdin_filename: Option<PathBuf>,
|
||||
/// Path to the cache directory.
|
||||
#[arg(long)]
|
||||
pub cache_dir: Option<PathBuf>,
|
||||
/// Show violations with source code.
|
||||
#[arg(long, overrides_with("no_show_source"))]
|
||||
show_source: bool,
|
||||
@@ -115,15 +121,6 @@ pub struct Cli {
|
||||
update_check: bool,
|
||||
#[clap(long, overrides_with("update_check"), hide = true)]
|
||||
no_update_check: bool,
|
||||
/// See the files Ruff will be run against with the current settings.
|
||||
#[arg(long)]
|
||||
pub show_files: bool,
|
||||
/// See the settings Ruff will use to check a given Python file.
|
||||
#[arg(long)]
|
||||
pub show_settings: bool,
|
||||
/// Enable automatic additions of `noqa` directives to failing lines.
|
||||
#[arg(long)]
|
||||
pub add_noqa: bool,
|
||||
/// Regular expression matching the name of dummy variables.
|
||||
#[arg(long)]
|
||||
pub dummy_variable_rgx: Option<Regex>,
|
||||
@@ -137,22 +134,97 @@ pub struct Cli {
|
||||
/// Maximum McCabe complexity allowed for a given function.
|
||||
#[arg(long)]
|
||||
pub max_complexity: Option<usize>,
|
||||
/// Round-trip auto-formatting.
|
||||
// TODO(charlie): This should be a sub-command.
|
||||
#[arg(long, hide = true)]
|
||||
pub autoformat: bool,
|
||||
/// The name of the file when passing it through stdin.
|
||||
#[arg(long)]
|
||||
pub stdin_filename: Option<PathBuf>,
|
||||
/// Enable automatic additions of `noqa` directives to failing lines.
|
||||
#[arg(
|
||||
long,
|
||||
// conflicts_with = "add_noqa",
|
||||
conflicts_with = "clean",
|
||||
conflicts_with = "explain",
|
||||
conflicts_with = "generate_shell_completion",
|
||||
conflicts_with = "show_files",
|
||||
conflicts_with = "show_settings",
|
||||
// Unsupported default-command arguments.
|
||||
conflicts_with = "stdin_filename",
|
||||
conflicts_with = "watch",
|
||||
)]
|
||||
pub add_noqa: bool,
|
||||
/// Clear any caches in the current directory or any subdirectories.
|
||||
#[arg(
|
||||
long,
|
||||
// Fake subcommands.
|
||||
conflicts_with = "add_noqa",
|
||||
// conflicts_with = "clean",
|
||||
conflicts_with = "explain",
|
||||
conflicts_with = "generate_shell_completion",
|
||||
conflicts_with = "show_files",
|
||||
conflicts_with = "show_settings",
|
||||
// Unsupported default-command arguments.
|
||||
conflicts_with = "stdin_filename",
|
||||
conflicts_with = "watch",
|
||||
)]
|
||||
pub clean: bool,
|
||||
/// Explain a rule.
|
||||
#[arg(long)]
|
||||
#[arg(
|
||||
long,
|
||||
// Fake subcommands.
|
||||
conflicts_with = "add_noqa",
|
||||
conflicts_with = "clean",
|
||||
// conflicts_with = "explain",
|
||||
conflicts_with = "generate_shell_completion",
|
||||
conflicts_with = "show_files",
|
||||
conflicts_with = "show_settings",
|
||||
// Unsupported default-command arguments.
|
||||
conflicts_with = "stdin_filename",
|
||||
conflicts_with = "watch",
|
||||
)]
|
||||
pub explain: Option<CheckCode>,
|
||||
/// Generate shell completion
|
||||
#[arg(long, hide = true, value_name = "SHELL")]
|
||||
#[arg(
|
||||
long,
|
||||
hide = true,
|
||||
value_name = "SHELL",
|
||||
// Fake subcommands.
|
||||
conflicts_with = "add_noqa",
|
||||
conflicts_with = "clean",
|
||||
conflicts_with = "explain",
|
||||
// conflicts_with = "generate_shell_completion",
|
||||
conflicts_with = "show_files",
|
||||
conflicts_with = "show_settings",
|
||||
// Unsupported default-command arguments.
|
||||
conflicts_with = "stdin_filename",
|
||||
conflicts_with = "watch",
|
||||
)]
|
||||
pub generate_shell_completion: Option<clap_complete_command::Shell>,
|
||||
/// Path to the cache directory.
|
||||
#[arg(long)]
|
||||
pub cache_dir: Option<PathBuf>,
|
||||
/// See the files Ruff will be run against with the current settings.
|
||||
#[arg(
|
||||
long,
|
||||
// Fake subcommands.
|
||||
conflicts_with = "add_noqa",
|
||||
conflicts_with = "clean",
|
||||
conflicts_with = "explain",
|
||||
conflicts_with = "generate_shell_completion",
|
||||
// conflicts_with = "show_files",
|
||||
conflicts_with = "show_settings",
|
||||
// Unsupported default-command arguments.
|
||||
conflicts_with = "stdin_filename",
|
||||
conflicts_with = "watch",
|
||||
)]
|
||||
pub show_files: bool,
|
||||
/// See the settings Ruff will use to check a given Python file.
|
||||
#[arg(
|
||||
long,
|
||||
// Fake subcommands.
|
||||
conflicts_with = "add_noqa",
|
||||
conflicts_with = "clean",
|
||||
conflicts_with = "explain",
|
||||
conflicts_with = "generate_shell_completion",
|
||||
conflicts_with = "show_files",
|
||||
// conflicts_with = "show_settings",
|
||||
// Unsupported default-command arguments.
|
||||
conflicts_with = "stdin_filename",
|
||||
conflicts_with = "watch",
|
||||
)]
|
||||
pub show_settings: bool,
|
||||
}
|
||||
|
||||
impl Cli {
|
||||
@@ -162,7 +234,7 @@ impl Cli {
|
||||
(
|
||||
Arguments {
|
||||
add_noqa: self.add_noqa,
|
||||
autoformat: self.autoformat,
|
||||
clean: self.clean,
|
||||
config: self.config,
|
||||
diff: self.diff,
|
||||
exit_zero: self.exit_zero,
|
||||
@@ -223,7 +295,7 @@ fn resolve_bool_arg(yes: bool, no: bool) -> Option<bool> {
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct Arguments {
|
||||
pub add_noqa: bool,
|
||||
pub autoformat: bool,
|
||||
pub clean: bool,
|
||||
pub config: Option<PathBuf>,
|
||||
pub diff: bool,
|
||||
pub exit_zero: bool,
|
||||
|
||||
@@ -1,26 +1,32 @@
|
||||
use std::fs::remove_dir_all;
|
||||
use std::io::{self, Read};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use colored::Colorize;
|
||||
use ignore::Error;
|
||||
use itertools::Itertools;
|
||||
use log::{debug, error};
|
||||
use path_absolutize::path_dedot;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use rayon::prelude::*;
|
||||
use rustpython_ast::Location;
|
||||
use serde::Serialize;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
use crate::autofix::fixer;
|
||||
use crate::cache::DEFAULT_CACHE_DIR_NAME;
|
||||
use crate::checks::{CheckCode, CheckKind};
|
||||
use crate::cli::Overrides;
|
||||
use crate::iterators::par_iter;
|
||||
use crate::linter::{add_noqa_to_path, autoformat_path, lint_path, lint_stdin, Diagnostics};
|
||||
use crate::linter::{add_noqa_to_path, lint_path, lint_stdin, Diagnostics};
|
||||
use crate::logging::LogLevel;
|
||||
use crate::message::Message;
|
||||
use crate::resolver::{FileDiscovery, PyprojectDiscovery};
|
||||
use crate::settings::flags;
|
||||
use crate::settings::types::SerializationFormat;
|
||||
use crate::{cache, packages, resolver};
|
||||
use crate::{cache, fs, packages, resolver};
|
||||
|
||||
/// Run the linter over a collection of files.
|
||||
pub fn run(
|
||||
@@ -204,45 +210,6 @@ pub fn add_noqa(
|
||||
Ok(modifications)
|
||||
}
|
||||
|
||||
/// Automatically format a collection of files.
|
||||
pub fn autoformat(
|
||||
files: &[PathBuf],
|
||||
pyproject_strategy: &PyprojectDiscovery,
|
||||
file_strategy: &FileDiscovery,
|
||||
overrides: &Overrides,
|
||||
) -> Result<usize> {
|
||||
// Collect all the files to format.
|
||||
let start = Instant::now();
|
||||
let (paths, resolver) =
|
||||
resolver::python_files_in_path(files, pyproject_strategy, file_strategy, overrides)?;
|
||||
let duration = start.elapsed();
|
||||
debug!("Identified files to lint in: {:?}", duration);
|
||||
|
||||
// Validate the `Settings` and return any errors.
|
||||
resolver.validate(pyproject_strategy)?;
|
||||
|
||||
let start = Instant::now();
|
||||
let modifications = par_iter(&paths)
|
||||
.flatten()
|
||||
.filter_map(|entry| {
|
||||
let path = entry.path();
|
||||
let settings = resolver.resolve(path, pyproject_strategy);
|
||||
match autoformat_path(path, settings) {
|
||||
Ok(()) => Some(()),
|
||||
Err(e) => {
|
||||
error!("Failed to autoformat {}: {e}", path.to_string_lossy());
|
||||
None
|
||||
}
|
||||
}
|
||||
})
|
||||
.count();
|
||||
|
||||
let duration = start.elapsed();
|
||||
debug!("Auto-formatted files in: {:?}", duration);
|
||||
|
||||
Ok(modifications)
|
||||
}
|
||||
|
||||
/// Print the user-facing configuration settings.
|
||||
pub fn show_settings(
|
||||
files: &[PathBuf],
|
||||
@@ -338,3 +305,21 @@ pub fn explain(code: &CheckCode, format: &SerializationFormat) -> Result<()> {
|
||||
};
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Clear any caches in the current directory or any subdirectories.
|
||||
pub fn clean(level: &LogLevel) -> Result<()> {
|
||||
for entry in WalkDir::new(&*path_dedot::CWD)
|
||||
.into_iter()
|
||||
.filter_map(std::result::Result::ok)
|
||||
.filter(|entry| entry.file_type().is_dir())
|
||||
{
|
||||
let cache = entry.path().join(DEFAULT_CACHE_DIR_NAME);
|
||||
if cache.is_dir() {
|
||||
if level >= &LogLevel::Default {
|
||||
eprintln!("Removing cache at: {}", fs::relativize_path(&cache).bold());
|
||||
}
|
||||
remove_dir_all(&cache)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// See: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals.
|
||||
|
||||
pub const TRIPLE_QUOTE_PREFIXES: &[&str] = &[
|
||||
"ur\"\"\"", "ur'''", "u\"\"\"", "u'''", "r\"\"\"", "r'''", "UR\"\"\"", "UR'''", "Ur\"\"\"",
|
||||
"Ur'''", "U\"\"\"", "U'''", "uR\"\"\"", "uR'''", "R\"\"\"", "R'''", "\"\"\"", "'''",
|
||||
"u\"\"\"", "u'''", "r\"\"\"", "r'''", "U\"\"\"", "U'''", "R\"\"\"", "R'''", "\"\"\"", "'''",
|
||||
];
|
||||
|
||||
pub const SINGLE_QUOTE_PREFIXES: &[&str] = &[
|
||||
"ur\"", "ur'", "u\"", "u'", "r\"", "r'", "ur\"", "ur'", "u\"", "u'", "r\"", "r'", "UR\"",
|
||||
"UR'", "Ur\"", "Ur'", "U\"", "U'", "uR\"", "uR'", "R\"", "R'", "\"", "'",
|
||||
"u\"", "u'", "r\"", "r'", "u\"", "u'", "r\"", "r'", "U\"", "U'", "R\"", "R'", "\"", "'",
|
||||
];
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
parent: ~
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 2
|
||||
@@ -32,6 +33,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
parent: ~
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 3
|
||||
@@ -47,6 +49,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
parent: ~
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 5
|
||||
@@ -62,6 +65,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
parent: ~
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 12
|
||||
@@ -77,4 +81,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 6
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionSlice3Referenced
|
||||
location:
|
||||
row: 7
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionSlice3Referenced
|
||||
location:
|
||||
row: 8
|
||||
@@ -26,4 +28,5 @@ expression: checks
|
||||
row: 8
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersion2Referenced
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr3
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr3
|
||||
location:
|
||||
row: 6
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 6
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr3
|
||||
location:
|
||||
row: 7
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr3
|
||||
location:
|
||||
row: 8
|
||||
@@ -42,4 +46,5 @@ expression: checks
|
||||
row: 8
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionInfo0Eq3Referenced
|
||||
location:
|
||||
row: 8
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 8
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionInfo0Eq3Referenced
|
||||
location:
|
||||
row: 9
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 9
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionInfo0Eq3Referenced
|
||||
location:
|
||||
row: 10
|
||||
@@ -34,4 +37,5 @@ expression: checks
|
||||
row: 10
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SixPY3Referenced
|
||||
location:
|
||||
row: 6
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 6
|
||||
column: 6
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionInfo1CmpInt
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionInfoMinorCmpInt
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersion0Referenced
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr10
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr10
|
||||
location:
|
||||
row: 6
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 6
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr10
|
||||
location:
|
||||
row: 7
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionCmpStr10
|
||||
location:
|
||||
row: 8
|
||||
@@ -42,4 +46,5 @@ expression: checks
|
||||
row: 8
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: SysVersionSlice1Referenced
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -332,7 +332,9 @@ pub fn definition(checker: &mut Checker, definition: &Definition, visibility: &V
|
||||
);
|
||||
if checker.patch(check.kind.code()) {
|
||||
match fixes::add_return_none_annotation(checker.locator, stmt) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,5 @@ expression: checks
|
||||
row: 29
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 10
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: foo
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 15
|
||||
column: 49
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: a
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 40
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: foo_method
|
||||
location:
|
||||
@@ -38,4 +41,5 @@ expression: checks
|
||||
row: 44
|
||||
column: 69
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingTypeFunctionArgument: a
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingTypeFunctionArgument: b
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingReturnTypePublicFunction: foo
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 9
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingTypeFunctionArgument: b
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 9
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingTypeFunctionArgument: b
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingReturnTypePublicFunction: foo
|
||||
location:
|
||||
@@ -65,6 +71,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingReturnTypePublicFunction: foo
|
||||
location:
|
||||
@@ -74,6 +81,7 @@ expression: checks
|
||||
row: 24
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: a
|
||||
location:
|
||||
@@ -83,6 +91,7 @@ expression: checks
|
||||
row: 44
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: foo
|
||||
location:
|
||||
@@ -92,6 +101,7 @@ expression: checks
|
||||
row: 49
|
||||
column: 49
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "*args"
|
||||
location:
|
||||
@@ -101,6 +111,7 @@ expression: checks
|
||||
row: 54
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "**kwargs"
|
||||
location:
|
||||
@@ -110,6 +121,7 @@ expression: checks
|
||||
row: 54
|
||||
column: 41
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "*args"
|
||||
location:
|
||||
@@ -119,6 +131,7 @@ expression: checks
|
||||
row: 59
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "**kwargs"
|
||||
location:
|
||||
@@ -128,6 +141,7 @@ expression: checks
|
||||
row: 64
|
||||
column: 41
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingTypeSelf: self
|
||||
location:
|
||||
@@ -137,6 +151,7 @@ expression: checks
|
||||
row: 74
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: a
|
||||
location:
|
||||
@@ -146,6 +161,7 @@ expression: checks
|
||||
row: 78
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: foo
|
||||
location:
|
||||
@@ -155,6 +171,7 @@ expression: checks
|
||||
row: 82
|
||||
column: 69
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "*params"
|
||||
location:
|
||||
@@ -164,6 +181,7 @@ expression: checks
|
||||
row: 86
|
||||
column: 45
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "**options"
|
||||
location:
|
||||
@@ -173,6 +191,7 @@ expression: checks
|
||||
row: 86
|
||||
column: 61
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "*params"
|
||||
location:
|
||||
@@ -182,6 +201,7 @@ expression: checks
|
||||
row: 90
|
||||
column: 45
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DynamicallyTypedExpression: "**options"
|
||||
location:
|
||||
@@ -191,6 +211,7 @@ expression: checks
|
||||
row: 94
|
||||
column: 61
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingTypeCls: cls
|
||||
location:
|
||||
@@ -200,4 +221,5 @@ expression: checks
|
||||
row: 104
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 5
|
||||
column: 22
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingReturnTypeSpecialMethod: __init__
|
||||
location:
|
||||
@@ -34,6 +35,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 11
|
||||
column: 27
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingReturnTypePrivateFunction: __init__
|
||||
location:
|
||||
@@ -43,4 +45,5 @@ expression: checks
|
||||
row: 40
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 45
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
MissingReturnTypePublicFunction: foo
|
||||
location:
|
||||
@@ -20,4 +21,5 @@ expression: checks
|
||||
row: 50
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 2
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: AssertUsed
|
||||
location:
|
||||
row: 8
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 8
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: AssertUsed
|
||||
location:
|
||||
row: 11
|
||||
@@ -26,4 +28,5 @@ expression: checks
|
||||
row: 11
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 3
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ExecUsed
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 9
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: HardcodedBindAllInterfaces
|
||||
location:
|
||||
row: 10
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 10
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: HardcodedBindAllInterfaces
|
||||
location:
|
||||
row: 14
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: HardcodedBindAllInterfaces
|
||||
location:
|
||||
row: 18
|
||||
@@ -34,4 +37,5 @@ expression: checks
|
||||
row: 18
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 12
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 15
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 16
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 17
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -65,6 +71,7 @@ expression: checks
|
||||
row: 18
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -74,6 +81,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -83,6 +91,7 @@ expression: checks
|
||||
row: 20
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -92,6 +101,7 @@ expression: checks
|
||||
row: 22
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -101,6 +111,7 @@ expression: checks
|
||||
row: 23
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -110,6 +121,7 @@ expression: checks
|
||||
row: 24
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -119,6 +131,7 @@ expression: checks
|
||||
row: 25
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -128,6 +141,7 @@ expression: checks
|
||||
row: 26
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -137,6 +151,7 @@ expression: checks
|
||||
row: 27
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -146,6 +161,7 @@ expression: checks
|
||||
row: 28
|
||||
column: 23
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -155,6 +171,7 @@ expression: checks
|
||||
row: 29
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -164,6 +181,7 @@ expression: checks
|
||||
row: 30
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -173,6 +191,7 @@ expression: checks
|
||||
row: 34
|
||||
column: 23
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -182,6 +201,7 @@ expression: checks
|
||||
row: 38
|
||||
column: 27
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -191,6 +211,7 @@ expression: checks
|
||||
row: 39
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -200,6 +221,7 @@ expression: checks
|
||||
row: 40
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -209,6 +231,7 @@ expression: checks
|
||||
row: 41
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -218,6 +241,7 @@ expression: checks
|
||||
row: 42
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -227,6 +251,7 @@ expression: checks
|
||||
row: 43
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -236,6 +261,7 @@ expression: checks
|
||||
row: 44
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -245,6 +271,7 @@ expression: checks
|
||||
row: 46
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -254,6 +281,7 @@ expression: checks
|
||||
row: 47
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -263,6 +291,7 @@ expression: checks
|
||||
row: 48
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -272,6 +301,7 @@ expression: checks
|
||||
row: 49
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -281,6 +311,7 @@ expression: checks
|
||||
row: 50
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -290,6 +321,7 @@ expression: checks
|
||||
row: 51
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -299,6 +331,7 @@ expression: checks
|
||||
row: 52
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordString: s3cr3t
|
||||
location:
|
||||
@@ -308,4 +341,5 @@ expression: checks
|
||||
row: 53
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,4 +11,5 @@ expression: checks
|
||||
row: 13
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 37
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordDefault: posonly
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 53
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordDefault: kwonly
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 21
|
||||
column: 46
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordDefault: posonly
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 29
|
||||
column: 47
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
HardcodedPasswordDefault: kwonly
|
||||
location:
|
||||
@@ -47,4 +51,5 @@ expression: checks
|
||||
row: 29
|
||||
column: 69
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 25
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BlindExcept: Exception
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 31
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BlindExcept: Exception
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 42
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BlindExcept: BaseException
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 45
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BlindExcept: Exception
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 54
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BlindExcept: Exception
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 60
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BlindExcept: BaseException
|
||||
location:
|
||||
@@ -65,4 +71,5 @@ expression: checks
|
||||
row: 62
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 10
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 10
|
||||
column: 36
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 11
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 11
|
||||
column: 41
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 14
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 37
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 15
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 15
|
||||
column: 42
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 18
|
||||
@@ -58,6 +64,7 @@ expression: checks
|
||||
row: 18
|
||||
column: 40
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalArgInFunctionDefinition
|
||||
location:
|
||||
row: 19
|
||||
@@ -66,4 +73,5 @@ expression: checks
|
||||
row: 19
|
||||
column: 45
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 12
|
||||
column: 34
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanDefaultValueInFunctionDefinition
|
||||
location:
|
||||
row: 13
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 46
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanDefaultValueInFunctionDefinition
|
||||
location:
|
||||
row: 14
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 44
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanDefaultValueInFunctionDefinition
|
||||
location:
|
||||
row: 15
|
||||
@@ -34,4 +37,5 @@ expression: checks
|
||||
row: 15
|
||||
column: 49
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 42
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalValueInFunctionCall
|
||||
location:
|
||||
row: 57
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 57
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: BooleanPositionalValueInFunctionCall
|
||||
location:
|
||||
row: 57
|
||||
@@ -26,4 +28,5 @@ expression: checks
|
||||
row: 57
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -70,11 +70,13 @@ pub fn setattr_with_constant(checker: &mut Checker, expr: &Expr, func: &Expr, ar
|
||||
let mut check = Check::new(CheckKind::SetAttrWithConstant, Range::from_located(expr));
|
||||
if checker.patch(check.kind.code()) {
|
||||
match assignment(obj, name, value, checker.style) {
|
||||
Ok(content) => check.amend(Fix::replacement(
|
||||
content,
|
||||
expr.location,
|
||||
expr.end_location.unwrap(),
|
||||
)),
|
||||
Ok(content) => {
|
||||
check.amend(Fix::replacement(
|
||||
content,
|
||||
expr.location,
|
||||
expr.end_location.unwrap(),
|
||||
));
|
||||
}
|
||||
Err(e) => error!("Failed to fix invalid comparison: {e}"),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 15
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UnaryPrefixIncrement
|
||||
location:
|
||||
row: 20
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 20
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,4 +10,5 @@ expression: checks
|
||||
row: 9
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 3
|
||||
column: 29
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UnreliableCallableCheck
|
||||
location:
|
||||
row: 5
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 5
|
||||
column: 36
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StripWithMultiCharacters
|
||||
location:
|
||||
row: 7
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StripWithMultiCharacters
|
||||
location:
|
||||
row: 10
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 10
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StripWithMultiCharacters
|
||||
location:
|
||||
row: 13
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StripWithMultiCharacters
|
||||
location:
|
||||
row: 16
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 16
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StripWithMultiCharacters
|
||||
location:
|
||||
row: 19
|
||||
@@ -50,4 +55,5 @@ expression: checks
|
||||
row: 19
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 60
|
||||
column: 33
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 64
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 64
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 68
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 68
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 72
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 72
|
||||
column: 44
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 76
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 76
|
||||
column: 56
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 80
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 80
|
||||
column: 44
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 85
|
||||
@@ -58,6 +64,7 @@ expression: checks
|
||||
row: 85
|
||||
column: 69
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 89
|
||||
@@ -66,6 +73,7 @@ expression: checks
|
||||
row: 89
|
||||
column: 72
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 93
|
||||
@@ -74,6 +82,7 @@ expression: checks
|
||||
row: 93
|
||||
column: 68
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 97
|
||||
@@ -82,6 +91,7 @@ expression: checks
|
||||
row: 97
|
||||
column: 34
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 170
|
||||
@@ -90,6 +100,7 @@ expression: checks
|
||||
row: 170
|
||||
column: 48
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 203
|
||||
@@ -98,6 +109,7 @@ expression: checks
|
||||
row: 203
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 204
|
||||
@@ -106,6 +118,7 @@ expression: checks
|
||||
row: 204
|
||||
column: 36
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: MutableArgumentDefault
|
||||
location:
|
||||
row: 205
|
||||
@@ -114,4 +127,5 @@ expression: checks
|
||||
row: 205
|
||||
column: 66
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 6
|
||||
column: 5
|
||||
parent: ~
|
||||
- kind:
|
||||
UnusedLoopControlVariable: k
|
||||
location:
|
||||
@@ -34,6 +35,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 18
|
||||
column: 13
|
||||
parent: ~
|
||||
- kind:
|
||||
UnusedLoopControlVariable: i
|
||||
location:
|
||||
@@ -50,6 +52,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 30
|
||||
column: 5
|
||||
parent: ~
|
||||
- kind:
|
||||
UnusedLoopControlVariable: k
|
||||
location:
|
||||
@@ -66,4 +69,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 30
|
||||
column: 13
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 85
|
||||
column: 68
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: range
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 89
|
||||
column: 71
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: range
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 93
|
||||
column: 67
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: time.time
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 109
|
||||
column: 49
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: dt.datetime.now
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 113
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: dt.timedelta
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 113
|
||||
column: 51
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: ~
|
||||
location:
|
||||
@@ -65,6 +71,7 @@ expression: checks
|
||||
row: 117
|
||||
column: 44
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: float
|
||||
location:
|
||||
@@ -74,6 +81,7 @@ expression: checks
|
||||
row: 155
|
||||
column: 47
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: float
|
||||
location:
|
||||
@@ -83,6 +91,7 @@ expression: checks
|
||||
row: 160
|
||||
column: 37
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: float
|
||||
location:
|
||||
@@ -92,6 +101,7 @@ expression: checks
|
||||
row: 164
|
||||
column: 57
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: float
|
||||
location:
|
||||
@@ -101,6 +111,7 @@ expression: checks
|
||||
row: 170
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: dt.datetime.now
|
||||
location:
|
||||
@@ -110,6 +121,7 @@ expression: checks
|
||||
row: 170
|
||||
column: 47
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: map
|
||||
location:
|
||||
@@ -119,6 +131,7 @@ expression: checks
|
||||
row: 176
|
||||
column: 62
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: random.randint
|
||||
location:
|
||||
@@ -128,6 +141,7 @@ expression: checks
|
||||
row: 181
|
||||
column: 59
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionCallArgumentDefault: dt.datetime.now
|
||||
location:
|
||||
@@ -137,4 +151,5 @@ expression: checks
|
||||
row: 181
|
||||
column: 53
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 18
|
||||
column: 19
|
||||
parent: ~
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 19
|
||||
@@ -32,6 +33,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 19
|
||||
column: 23
|
||||
parent: ~
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 20
|
||||
@@ -47,6 +49,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 20
|
||||
column: 22
|
||||
parent: ~
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 21
|
||||
@@ -62,6 +65,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 21
|
||||
column: 23
|
||||
parent: ~
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 22
|
||||
@@ -77,6 +81,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 22
|
||||
column: 31
|
||||
parent: ~
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 23
|
||||
@@ -92,4 +97,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 23
|
||||
column: 20
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 37
|
||||
column: 25
|
||||
parent: ~
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 38
|
||||
@@ -32,6 +33,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 38
|
||||
column: 29
|
||||
parent: ~
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 39
|
||||
@@ -47,6 +49,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 39
|
||||
column: 28
|
||||
parent: ~
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 40
|
||||
@@ -62,6 +65,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 40
|
||||
column: 29
|
||||
parent: ~
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 41
|
||||
@@ -77,4 +81,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 41
|
||||
column: 30
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 8
|
||||
column: 12
|
||||
parent: ~
|
||||
- kind: DoNotAssertFalse
|
||||
location:
|
||||
row: 10
|
||||
@@ -32,4 +33,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 10
|
||||
column: 23
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: return
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: return
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 21
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: return
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 31
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: return
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 44
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: break
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 66
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: continue
|
||||
location:
|
||||
@@ -65,6 +71,7 @@ expression: checks
|
||||
row: 78
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: return
|
||||
location:
|
||||
@@ -74,6 +81,7 @@ expression: checks
|
||||
row: 94
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: continue
|
||||
location:
|
||||
@@ -83,6 +91,7 @@ expression: checks
|
||||
row: 101
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
JumpStatementInFinally: break
|
||||
location:
|
||||
@@ -92,4 +101,5 @@ expression: checks
|
||||
row: 107
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,4 +18,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 3
|
||||
column: 20
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 17
|
||||
column: 25
|
||||
parent: ~
|
||||
- kind:
|
||||
DuplicateHandlerException:
|
||||
- MyError
|
||||
@@ -36,6 +37,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 28
|
||||
column: 25
|
||||
parent: ~
|
||||
- kind:
|
||||
DuplicateHandlerException:
|
||||
- re.error
|
||||
@@ -53,4 +55,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 49
|
||||
column: 27
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 3
|
||||
column: 6
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessComparison
|
||||
location:
|
||||
row: 7
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessComparison
|
||||
location:
|
||||
row: 17
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 17
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessComparison
|
||||
location:
|
||||
row: 24
|
||||
@@ -34,4 +37,5 @@ expression: checks
|
||||
row: 24
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 6
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CannotRaiseLiteral
|
||||
location:
|
||||
row: 7
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CannotRaiseLiteral
|
||||
location:
|
||||
row: 8
|
||||
@@ -26,4 +28,5 @@ expression: checks
|
||||
row: 8
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,4 +10,5 @@ expression: checks
|
||||
row: 23
|
||||
column: 42
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 11
|
||||
column: 6
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 12
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 12
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 13
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 14
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 15
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 15
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 16
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 16
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 17
|
||||
@@ -58,6 +64,7 @@ expression: checks
|
||||
row: 17
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 18
|
||||
@@ -66,6 +73,7 @@ expression: checks
|
||||
row: 18
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 19
|
||||
@@ -74,6 +82,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 20
|
||||
@@ -82,6 +91,7 @@ expression: checks
|
||||
row: 20
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 24
|
||||
@@ -90,6 +100,7 @@ expression: checks
|
||||
row: 24
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 27
|
||||
@@ -98,6 +109,7 @@ expression: checks
|
||||
row: 27
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 39
|
||||
@@ -106,6 +118,7 @@ expression: checks
|
||||
row: 39
|
||||
column: 6
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 40
|
||||
@@ -114,6 +127,7 @@ expression: checks
|
||||
row: 40
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 41
|
||||
@@ -122,6 +136,7 @@ expression: checks
|
||||
row: 41
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 42
|
||||
@@ -130,6 +145,7 @@ expression: checks
|
||||
row: 42
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 43
|
||||
@@ -138,6 +154,7 @@ expression: checks
|
||||
row: 43
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 44
|
||||
@@ -146,6 +163,7 @@ expression: checks
|
||||
row: 44
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 45
|
||||
@@ -154,6 +172,7 @@ expression: checks
|
||||
row: 45
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 46
|
||||
@@ -162,6 +181,7 @@ expression: checks
|
||||
row: 46
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 47
|
||||
@@ -170,6 +190,7 @@ expression: checks
|
||||
row: 47
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 48
|
||||
@@ -178,6 +199,7 @@ expression: checks
|
||||
row: 48
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 52
|
||||
@@ -186,6 +208,7 @@ expression: checks
|
||||
row: 52
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessExpression
|
||||
location:
|
||||
row: 55
|
||||
@@ -194,4 +217,5 @@ expression: checks
|
||||
row: 55
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 78
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 82
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 82
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 86
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 86
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 90
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 90
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 94
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 94
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 98
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 98
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 102
|
||||
@@ -58,6 +64,7 @@ expression: checks
|
||||
row: 102
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: CachedInstanceMethod
|
||||
location:
|
||||
row: 106
|
||||
@@ -66,4 +73,5 @@ expression: checks
|
||||
row: 106
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 8
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
LoopVariableOverridesIterator: values
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 21
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
LoopVariableOverridesIterator: vars
|
||||
location:
|
||||
@@ -29,4 +31,5 @@ expression: checks
|
||||
row: 36
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 3
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 14
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 22
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 22
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 30
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 30
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 38
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 38
|
||||
column: 28
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 46
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 46
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 54
|
||||
@@ -58,6 +64,7 @@ expression: checks
|
||||
row: 54
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 62
|
||||
@@ -66,6 +73,7 @@ expression: checks
|
||||
row: 62
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 70
|
||||
@@ -74,6 +82,7 @@ expression: checks
|
||||
row: 70
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: FStringDocstring
|
||||
location:
|
||||
row: 74
|
||||
@@ -82,4 +91,5 @@ expression: checks
|
||||
row: 74
|
||||
column: 48
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 9
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: UselessContextlibSuppress
|
||||
location:
|
||||
row: 12
|
||||
@@ -18,4 +19,5 @@ expression: checks
|
||||
row: 12
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 12
|
||||
column: 30
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: y
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 30
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 16
|
||||
column: 16
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 28
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 29
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 30
|
||||
column: 19
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -65,6 +71,7 @@ expression: checks
|
||||
row: 31
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -74,6 +81,7 @@ expression: checks
|
||||
row: 40
|
||||
column: 34
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: x
|
||||
location:
|
||||
@@ -83,6 +91,7 @@ expression: checks
|
||||
row: 42
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: a
|
||||
location:
|
||||
@@ -92,6 +101,7 @@ expression: checks
|
||||
row: 50
|
||||
column: 30
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: a_
|
||||
location:
|
||||
@@ -101,6 +111,7 @@ expression: checks
|
||||
row: 51
|
||||
column: 31
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: b
|
||||
location:
|
||||
@@ -110,6 +121,7 @@ expression: checks
|
||||
row: 52
|
||||
column: 30
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: c
|
||||
location:
|
||||
@@ -119,6 +131,7 @@ expression: checks
|
||||
row: 53
|
||||
column: 30
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: j
|
||||
location:
|
||||
@@ -128,6 +141,7 @@ expression: checks
|
||||
row: 61
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: k
|
||||
location:
|
||||
@@ -137,6 +151,7 @@ expression: checks
|
||||
row: 61
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: l
|
||||
location:
|
||||
@@ -146,6 +161,7 @@ expression: checks
|
||||
row: 68
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
FunctionUsesLoopVariable: i
|
||||
location:
|
||||
@@ -155,4 +171,5 @@ expression: checks
|
||||
row: 82
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
AbstractBaseClassWithoutAbstractMethod: MetaBase_1
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 60
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
AbstractBaseClassWithoutAbstractMethod: abc_Base_1
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 71
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
AbstractBaseClassWithoutAbstractMethod: abc_Base_2
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 76
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
AbstractBaseClassWithoutAbstractMethod: notabc_Base_1
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 81
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
AbstractBaseClassWithoutAbstractMethod: abc_set_class_variable_4
|
||||
location:
|
||||
@@ -56,4 +61,5 @@ expression: checks
|
||||
row: 129
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DuplicateTryBlockException: pickle.PickleError
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 28
|
||||
column: 25
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DuplicateTryBlockException: ValueError
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 35
|
||||
column: 17
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
DuplicateTryBlockException: TypeError
|
||||
location:
|
||||
@@ -38,4 +41,5 @@ expression: checks
|
||||
row: 37
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 16
|
||||
column: 30
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StarArgUnpackingAfterKeywordArg
|
||||
location:
|
||||
row: 17
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 17
|
||||
column: 23
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StarArgUnpackingAfterKeywordArg
|
||||
location:
|
||||
row: 18
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 18
|
||||
column: 34
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StarArgUnpackingAfterKeywordArg
|
||||
location:
|
||||
row: 19
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 40
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StarArgUnpackingAfterKeywordArg
|
||||
location:
|
||||
row: 20
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 20
|
||||
column: 23
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StarArgUnpackingAfterKeywordArg
|
||||
location:
|
||||
row: 20
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 20
|
||||
column: 33
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: StarArgUnpackingAfterKeywordArg
|
||||
location:
|
||||
row: 21
|
||||
@@ -58,4 +64,5 @@ expression: checks
|
||||
row: 21
|
||||
column: 33
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 13
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
EmptyMethodWithoutAbstractDecorator: AbstractClass
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 16
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
EmptyMethodWithoutAbstractDecorator: AbstractClass
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 20
|
||||
column: 11
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
EmptyMethodWithoutAbstractDecorator: AbstractClass
|
||||
location:
|
||||
@@ -38,4 +41,5 @@ expression: checks
|
||||
row: 27
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 10
|
||||
column: 23
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: RaiseWithoutFromInsideExcept
|
||||
location:
|
||||
row: 11
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 11
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: RaiseWithoutFromInsideExcept
|
||||
location:
|
||||
row: 16
|
||||
@@ -26,4 +28,5 @@ expression: checks
|
||||
row: 16
|
||||
column: 39
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ZipWithoutExplicitStrict
|
||||
location:
|
||||
row: 2
|
||||
@@ -18,6 +19,7 @@ expression: checks
|
||||
row: 2
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ZipWithoutExplicitStrict
|
||||
location:
|
||||
row: 3
|
||||
@@ -26,6 +28,7 @@ expression: checks
|
||||
row: 3
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ZipWithoutExplicitStrict
|
||||
location:
|
||||
row: 4
|
||||
@@ -34,6 +37,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ZipWithoutExplicitStrict
|
||||
location:
|
||||
row: 4
|
||||
@@ -42,6 +46,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 23
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ZipWithoutExplicitStrict
|
||||
location:
|
||||
row: 5
|
||||
@@ -50,6 +55,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind: ZipWithoutExplicitStrict
|
||||
location:
|
||||
row: 6
|
||||
@@ -58,4 +64,5 @@ expression: checks
|
||||
row: 6
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,4 +11,5 @@ expression: checks
|
||||
row: 19
|
||||
column: 63
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 18
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: int
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 2
|
||||
column: 29
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: print
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 4
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: copyright
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 9
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: complex
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 6
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: float
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 5
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: object
|
||||
location:
|
||||
@@ -65,6 +71,7 @@ expression: checks
|
||||
row: 7
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: min
|
||||
location:
|
||||
@@ -74,6 +81,7 @@ expression: checks
|
||||
row: 8
|
||||
column: 3
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: max
|
||||
location:
|
||||
@@ -83,6 +91,7 @@ expression: checks
|
||||
row: 8
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: bytes
|
||||
location:
|
||||
@@ -92,6 +101,7 @@ expression: checks
|
||||
row: 11
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: slice
|
||||
location:
|
||||
@@ -101,6 +111,7 @@ expression: checks
|
||||
row: 14
|
||||
column: 8
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: ValueError
|
||||
location:
|
||||
@@ -110,6 +121,7 @@ expression: checks
|
||||
row: 19
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: memoryview
|
||||
location:
|
||||
@@ -119,6 +131,7 @@ expression: checks
|
||||
row: 21
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: bytearray
|
||||
location:
|
||||
@@ -128,6 +141,7 @@ expression: checks
|
||||
row: 21
|
||||
column: 26
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: str
|
||||
location:
|
||||
@@ -137,6 +151,7 @@ expression: checks
|
||||
row: 24
|
||||
column: 24
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: all
|
||||
location:
|
||||
@@ -146,6 +161,7 @@ expression: checks
|
||||
row: 24
|
||||
column: 47
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: any
|
||||
location:
|
||||
@@ -155,6 +171,7 @@ expression: checks
|
||||
row: 24
|
||||
column: 52
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinVariableShadowing: sum
|
||||
location:
|
||||
@@ -164,4 +181,5 @@ expression: checks
|
||||
row: 27
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinArgumentShadowing: type
|
||||
location:
|
||||
@@ -20,6 +21,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 22
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinArgumentShadowing: complex
|
||||
location:
|
||||
@@ -29,6 +31,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 32
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinArgumentShadowing: Exception
|
||||
location:
|
||||
@@ -38,6 +41,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 43
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinArgumentShadowing: getattr
|
||||
location:
|
||||
@@ -47,6 +51,7 @@ expression: checks
|
||||
row: 1
|
||||
column: 54
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinArgumentShadowing: bytes
|
||||
location:
|
||||
@@ -56,6 +61,7 @@ expression: checks
|
||||
row: 5
|
||||
column: 21
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinArgumentShadowing: float
|
||||
location:
|
||||
@@ -65,4 +71,5 @@ expression: checks
|
||||
row: 9
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ expression: checks
|
||||
row: 2
|
||||
column: 15
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BuiltinAttributeShadowing: str
|
||||
location:
|
||||
@@ -20,4 +21,5 @@ expression: checks
|
||||
row: 8
|
||||
column: 12
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -61,7 +61,9 @@ pub fn unnecessary_generator_list(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryGeneratorList, location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_generator_list(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -85,7 +87,9 @@ pub fn unnecessary_generator_set(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryGeneratorSet, location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_generator_set(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -111,7 +115,9 @@ pub fn unnecessary_generator_dict(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryGeneratorDict, location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_generator_dict(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -138,7 +144,9 @@ pub fn unnecessary_list_comprehension_set(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryListComprehensionSet, location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_list_comprehension_set(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -170,7 +178,9 @@ pub fn unnecessary_list_comprehension_dict(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryListComprehensionDict, location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_list_comprehension_dict(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -196,7 +206,9 @@ pub fn unnecessary_literal_set(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryLiteralSet(kind.to_string()), location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_literal_set(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -232,7 +244,9 @@ pub fn unnecessary_literal_dict(
|
||||
);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_literal_dict(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -268,7 +282,9 @@ pub fn unnecessary_collection_call(
|
||||
);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_collection_call(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -296,7 +312,9 @@ pub fn unnecessary_literal_within_tuple_call(
|
||||
);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_literal_within_tuple_call(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -324,7 +342,9 @@ pub fn unnecessary_literal_within_list_call(
|
||||
);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_literal_within_list_call(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -347,7 +367,9 @@ pub fn unnecessary_list_call(
|
||||
let mut check = Check::new(CheckKind::UnnecessaryListCall, location);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_list_call(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -380,7 +402,9 @@ pub fn unnecessary_call_around_sorted(
|
||||
);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_call_around_sorted(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
@@ -503,7 +527,9 @@ pub fn unnecessary_comprehension(
|
||||
);
|
||||
if fix {
|
||||
match fixes::fix_unnecessary_comprehension(locator, expr) {
|
||||
Ok(fix) => check.amend(fix),
|
||||
Ok(fix) => {
|
||||
check.amend(fix);
|
||||
}
|
||||
Err(e) => error!("Failed to generate fix: {e}"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 29
|
||||
parent: ~
|
||||
- kind: UnnecessaryGeneratorList
|
||||
location:
|
||||
row: 2
|
||||
@@ -32,4 +33,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 28
|
||||
parent: ~
|
||||
- kind: UnnecessaryGeneratorSet
|
||||
location:
|
||||
row: 2
|
||||
@@ -32,4 +33,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 30
|
||||
parent: ~
|
||||
- kind: UnnecessaryGeneratorDict
|
||||
location:
|
||||
row: 2
|
||||
@@ -32,4 +33,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 30
|
||||
parent: ~
|
||||
- kind: UnnecessaryListComprehensionSet
|
||||
location:
|
||||
row: 2
|
||||
@@ -32,4 +33,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -17,4 +17,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 32
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 16
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralSet: tuple
|
||||
location:
|
||||
@@ -34,6 +35,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 2
|
||||
column: 16
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralSet: list
|
||||
location:
|
||||
@@ -50,6 +52,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 3
|
||||
column: 12
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralSet: tuple
|
||||
location:
|
||||
@@ -66,4 +69,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 12
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 19
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralDict: tuple
|
||||
location:
|
||||
@@ -34,6 +35,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralDict: list
|
||||
location:
|
||||
@@ -50,6 +52,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 3
|
||||
column: 13
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralDict: tuple
|
||||
location:
|
||||
@@ -66,4 +69,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 13
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 11
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryCollectionCall: list
|
||||
location:
|
||||
@@ -34,6 +35,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 2
|
||||
column: 10
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryCollectionCall: dict
|
||||
location:
|
||||
@@ -50,6 +52,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 3
|
||||
column: 11
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryCollectionCall: dict
|
||||
location:
|
||||
@@ -66,4 +69,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 4
|
||||
column: 14
|
||||
parent: ~
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 1
|
||||
column: 14
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: list
|
||||
location:
|
||||
@@ -34,6 +35,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 2
|
||||
column: 18
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: tuple
|
||||
location:
|
||||
@@ -50,6 +52,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 3
|
||||
column: 18
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: list
|
||||
location:
|
||||
@@ -66,6 +69,7 @@ expression: checks
|
||||
end_location:
|
||||
row: 7
|
||||
column: 2
|
||||
parent: ~
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: tuple
|
||||
location:
|
||||
@@ -82,4 +86,5 @@ expression: checks
|
||||
end_location:
|
||||
row: 10
|
||||
column: 1
|
||||
parent: ~
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user