Skip to content

Commit

Permalink
fix: update ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Jul 30, 2024
1 parent 74d878c commit cd6af21
Showing 1 changed file with 75 additions and 52 deletions.
127 changes: 75 additions & 52 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,60 +1,55 @@
target-version = "py38"
line-length = 88
unsafe-fixes = true
target-version = "py39"

[lint]
select = ["ALL"]
fixable = [
"UP",
'F401', # unused imports
"F522", # string-dot-format-extra-named-arguments
"F541", # f-string-missing-placeholders
"W292", # no-new-line-at-end-of-file
"E711", # none-comparison
"E712", # true-false-comparison
"E713", # not-in-test
"E714", # not-is-test
"I001", # unsorted-imports
"UP037", # quoted-annotation
"W293", # blank-line-with-whitespace
"RSE102", # unnecessary-paren-on-raise-exception
"SIM108", # if-else-block-instead-of-if-exp
"I002", # missing-required-import
"RUF100", # unused-noqa
"D",
'UP',
'F401', # unused imports
"F522", # string-dot-format-extra-named-arguments
"F541", # f-string-missing-placeholders
"W292", # no-new-line-at-end-of-file
"E711", # none-comparison
"E712", # true-false-comparison
"E713", # not-in-test
"E714", # not-is-test
"I001", # unsorted-imports
"COM812", # trailing-comma-missing
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"SIM108", # if-else-block-instead-of-if-exp
"E501", # line-too-long
"FLY002", # static-join-to-f-string
"PLW3301", # nested-min-max
"RUF010", # explicit-f-string-type-conversion
"RUF100", # unused-noqa
"SIM110", # reimplemented-builtin
"RET504", # unnecessary-assign
"I002", # missing-required-import
"PIE808", # unnecessary-range-start
"RUF020", # never-union
"NPY201", # numpy2-deprecation
]
ignore = [
'TD', # flake8-todos
'E712', # TrueFalseComparison # sqlalchemy
"E711", # none-comparison # sqlalchemy
"D100", # public-module
"D104", # public-package
"D107", # public-init
"D201", # no-blank-line-before-function
"D202", # no-blank-line-after-function
"D203", # one-blank-line-before-class
"D204", # one-blank-line-after-class
"D211", # no-blank-line-before-class
"D212", # multi-line-summary-first-line
"D213", # multi-line-summary-second-line
"D400", # ends-in-period
"D401", # non-imperative-mood
"D403", # first-line-capitalized
"D406", # new-line-after-section-name
"D407", # dashed-underline-after-section
"D417", # undocumented-param
"D415", # ends-in-punctuation
"EM101", # raw-string-in-exception
"TRY003", # raise-vanilla-args
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"ANN401", # dynamically-typed-expression
"FBT002", # boolean-default-value-in-function-definition
"PGH003", # blanket-type-ignore
"SIM117", # multiple-with-statements # python3.8
"B905", # zip-without-explicit-strict
"PD010", # use-of-dot-pivot-or-unstack
"D105", # undocumented-magic-method
"TD", # flake8-todos
"FIX", # flake8-fixme
"D413", # blank-line-after-last-section
"TD",
'E712', # TrueFalseComparison # sqlalchemy
"E711", # none-comparison # sqlalchemy
"EM101", # raw-string-in-exception
"TRY003", # raise-vanilla-args
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"ANN401", # dynamically-typed-expression
"FBT002", # boolean-default-value-in-function-definition
"PGH003", # blanket-type-ignore
"SIM117", # multiple-with-statements # python3.8
"B905", # zip-without-explicit-strict
"PD010", # use-of-dot-pivot-or-unstack
"D105", # undocumented-magic-method
"TD", # flake8-todos
"FIX", # flake8-fixme
"PLR2044", # empty-comment
# ruff format
"W191", # tab-indentation
"E111", # indentation-with-invalid-multiple
Expand All @@ -70,6 +65,28 @@ ignore = [
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
# pydocstyle # google default
"D203",
"D204",
"D213",
"D215",
"D400",
"D401",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
# pydocstyle # ignore
"D212", # multi-line-summary-first-line
"D403", # first-line-capitalized
"D415", # ends-in-punctuation
"D107", # undocumented-public-init
"D105", # undocumented-magic-method
# pydocstyle # TODO
"D100", # undocumented-public-module
"D104", # undocumented-public-package
]

[lint.per-file-ignores]
Expand Down Expand Up @@ -100,4 +117,10 @@ required-imports = ["from __future__ import annotations"]
# ruff format
force-single-line = false
force-wrap-aliases = false
split-on-trailing-comma = false
split-on-trailing-comma = false

[lint.pydocstyle]
convention = "google"

[lint.flake8-type-checking]
exempt-modules = ["typing", "typing_extensions"]

0 comments on commit cd6af21

Please sign in to comment.