-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatter should respect extend-ignore #8222
Comments
Are you able to post your complete configuration file? |
ruff related config part: [tool.ruff]
line-length = 110
unfixable = [ ]
extend-exclude = [ ".egg*", "build", "private" ]
extend-select = [
"B",
"C4",
"D101",
"D106",
"D2",
"D3",
"D400",
"D402",
"D403",
"D412",
"D419",
"I",
"ICN",
"N",
"PGH",
"PIE",
"PT",
"PTH",
"Q",
"RUF",
"RUF100",
"SIM",
"TCH",
"TID",
"UP"
]
extend-ignore = [
"COM812",
"COM819",
"D203",
"D205",
"D206",
"D212",
"D213",
"D214",
"D215",
"D300",
"E111",
"E114",
"E117",
"E731",
"ISC001",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"RUF012",
"W191"
]
[tool.ruff.isort]
required-imports = [ "from __future__ import annotations" ]
combine-as-imports = true
section-order = [
"future",
"standard-library",
"tests",
"cdk",
"glue",
"lambda",
"glue-preinstalled",
"third-party",
"first-party",
"local-folder"
]
[tool.ruff.isort.sections]
glue = [ "awsglue", "pyspark", "ray" ]
glue-preinstalled = [
"boto3",
"botocore",
"fsspec",
"matplotlib",
"mpmath",
"numpy",
"pandas",
"pyarrow",
"PyMySQL",
"pyparsing",
"python-dateutil",
"pytz",
"PyYAML",
"regex",
"requests",
"s3fs",
"sympy"
]
cdk = [ "aws_cdk", "constructs" ]
lambda = [ "aws_lambda_powertools", "aws_lambda_typing" ]
tests = [ "pytest", "moto", "mock", "unittest", "syrupy" ]
[tool.ruff.flake8-import-conventions.extend-aliases]
awswrangler = "wr"
aws_cdk = "cdk"
[tool.ruff.flake8-type-checking]
exempt-modules = [
"typing",
"typing_extensions",
"awsglue",
"pyspark",
"ray",
"aws_cdk",
"constructs",
"aws_lambda_typing",
"aws_lambda_powertools"
] |
Ok, I see #8243 - will switch our config to not use |
@tinovyatkin - It actually should work interchangeably. Did changing to |
Yes, changing to |
They should be interchangeable -- |
ruff 0.1.2 emits warning
warning: The following rules may cause conflicts when used with the formatter: 'D206', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003'. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the
selector
extend-selectconfiguration, or adding then to the
ignoreconfiguration.
even while I have all those rules inextend-ignore
The text was updated successfully, but these errors were encountered: