Skip to content

Commit

Permalink
fix: add ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
mike325 committed Dec 5, 2023
1 parent 1aa254a commit c1d65ba
Showing 1 changed file with 45 additions and 57 deletions.
102 changes: 45 additions & 57 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,52 @@ readme = "README.md"
authors = [{ name = "Foo", email = "[email protected]" }]
license = { text = "MIT" }

# [build-system]
# requires = [
# "mypy",
# "flake8",
# "flake8-mypy",
# "black",
# "mccabe",
# "virtualenv",
# ]
# build-backend = "setuptools.build_meta"
[tool.ruff]
ignore = [
# E121,
# E123,
# E126,
"E203", # Whitespace before :
# E221,
"E226", # Whitespace around operators
# E228,
"E231", # Missing whitespace after ,
# E24,
# E251,
"E261", # 2 spaces before inline comment
"E262", # Comments should start with #
"E265", # Block comment should start with #
# E27,
# "E302", # Expected 2 lines between funcs/classes
# E501, # line too long (156 > 120 characters)
# E701,
# E704,
# H233,
# "W391", # Blank line and the EOF
# W503,
# W504,
"E402", # module level import not at top file
]
exclude = [
# No need to traverse our git directory
".git",
# There's no value in checking cache directories
"__pycache__",
# The conf file is mostly autogenerated, ignore it
"build",
# This contains builds of flake8 that we don't want to check
"dist",
]

# # NOTE: flake8 does not support pyproject use .flake8 config
# [tool.flake8]
# max-complexity = 20
# max-line-length = 120
# ignore =
# # E121,
# # E123,
# # E126,
# # Whitespace before :
# E203,
# # E221,
# # Whitespace around operators
# E226,
# # E228,
# # Missing whitespace after ,
# E231,
# # E24,
# # E251,
# # 2 spaces before inline comment
# E261,
# # Comments should start with #
# E262,
# # Block comment should start with #
# E265,
# # E27,
# # Expected 2 lines between funcs/classes
# E302,
# # E501,
# # E701,
# # E704,
# # H233,
# # Blank line and the EOF
# W391,
# # W503,
# # W504,
# exclude =
# # No need to traverse our git directory
# .git,
# # There's no value in checking cache directories
# __pycache__,
# # The conf file is mostly autogenerated, ignore it
# build,
# # This contains builds of flake8 that we don't want to check
# dist
# per-file-ignores =
# # imported but unused
# __init__.py: F401
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]

[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 20.
max-complexity = 20

[tool.ruff.lint.pycodestyle]
max-line-length = 120

[tool.black]
line-length = 120
Expand Down

0 comments on commit c1d65ba

Please sign in to comment.