1 Star 0 Fork 0

久忆 / pwndbg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pyproject.toml 5.71 KB
一键复制 编辑 原始数据 按行查看 历史
lebr0nli 提交于 2023-02-13 17:21 . Ignore missing rich module for mypy
[tool.black]
line-length = 100
extend-exclude = "gdb-pt-dump"
[tool.mypy]
strict_optional = false
check_untyped_defs = true
allow_untyped_globals = true
allow_redefinition = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
# warn_return_any = true
# warn_unreachable = true
show_error_context = true
pretty = true
show_error_codes = true
incremental = false
disable_error_code = [
# Lots of dynamic attribute access
"attr-defined",
# https://github.com/python/mypy/issues/6232
"assignment"
]
[[tool.mypy.overrides]]
module = [
# Capstone constants
"pwndbg.disasm.*",
"pwndbg.gdblib.nearpc",
# Module fields
"pwndbg.gdblib.typeinfo",
"pwndbg.gdblib.elf",
"pwndbg.auxv",
]
disable_error_code = ["name-defined"]
[[tool.mypy.overrides]]
module = ["capstone.*", "unicorn.*", "pwnlib.*", "elftools.*", "ipdb.*", "r2pipe", "rzpipe", "rich.*", "pt"]
ignore_missing_imports = true
[tool.isort]
profile = "black"
force_single_line = true
known_third_party = ["capstone", "unicorn", "psutil", "pycparser", "gdb"]
extend_skip_glob = ["gdb-pt-dump/*"]
[tool.coverage.run]
branch = true
parallel = true
disable_warnings = ["module-not-imported"]
source = ["${SRC_DIR-.}"]
omit = ["ida_script.py"]
data_file = ".cov/coverage"
[tool.coverage.report]
omit = ["ida_script.py", "tests/*"]
[tool.pylint.main]
# Analyse import fallback blocks. This can be used to support both Python 2 and 3
# compatible code, which means that the block might have code that exists only in
# one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks = true
disable = [
"design", # TODO: disable explicit checks
# basic
"invalid-name",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"pointless-string-statement", # TODO: Fix these
"dangerous-default-value", # TODO: Fix these
# classes
"arguments-renamed",
"protected-access", # TODO: Fix these
"abstract-method", # TODO: Fix these
"attribute-defined-outside-init", # TODO: Fix these
# exceptions
"broad-except",
"raise-missing-from",
# format
"line-too-long",
# imports
"import-outside-toplevel",
"wrong-import-position",
"wildcard-import", # TODO: Fix these
# lambda-expressions
"unnecessary-lambda-assignment",
# miscellaneous
"fixme",
# refactoring
"consider-using-f-string", # TODO: Fix these
"consider-using-with", # TODO: Fix these
"no-else-return", # TODO: Fix these
"no-else-raise", # TODO: Fix these
"no-else-continue", # TODO: Fix these
"no-else-break", # TODO: Fix these
"inconsistent-return-statements", # TODO: Fix these
"redefined-argument-from-local",
# stdlib
"unspecified-encoding",
# typecheck
"no-member",
"keyword-arg-before-vararg",
"assignment-from-none", # TODO: Fix these
# variables
"possibly-unused-variable",
"redefined-outer-name",
"global-statement",
"unused-wildcard-import",
"unused-argument", # TODO: Fix these
"unused-variable", # TODO: Fix these
"undefined-loop-variable", # TODO: Fix these
"undefined-variable", # TODO: Fix these
"redefined-builtin", # TODO: Fix these
]
# Files or directories to be skipped. They should be base names, not paths.
ignore = ["tests", "gdb-pt-dump", ".git"]
# List of module names for which member attributes should not be checked (useful
# for modules/projects where namespaces are manipulated during runtime and thus
# existing member attributes cannot be deduced by static analysis). It supports
# qualified module names, as well as Unix pattern matching.
ignored-modules = ["gdb", "pt"]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs = 0
# Control the amount of potential inferred values when inferring a single object.
# This can help the performance when dealing with large functions or complex,
# nested conditions.
limit-inference-results = 100
# Pickle collected data for later comparisons.
persistent = true
# Minimum Python version to use for version dependent checks. Will default to the
# version used to run pylint.
py-version = "3.7"
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode = true
[tool.pylint.design]
# Maximum number of arguments for function / method.
max-args = 5
# Maximum number of attributes for a class (see R0902).
max-attributes = 7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr = 5
# Maximum number of branch for function / method body.
max-branches = 12
# Maximum number of locals for function / method body.
max-locals = 15
# Maximum number of parents for a class (see R0901).
max-parents = 7
# Maximum number of public methods for a class (see R0904).
max-public-methods = 20
# Maximum number of return / yield for function / method body.
max-returns = 6
# Maximum number of statements in function / method body.
max-statements = 50
# Minimum number of public methods for a class (see R0903).
min-public-methods = 2
[tool.pylint.format]
# Maximum number of lines in a module.
max-module-lines = 2500 # TODO: Reduce to 1000
[tool.pylint."messages control"]
# Only show warnings with the listed confidence levels. Leave empty to show all.
# Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFINED"]
[tool.pylint.refactoring]
# Maximum number of nested blocks for function / method body
max-nested-blocks = 6
[tool.pylint.reports]
output-format = "colorized"
1
https://gitee.com/gjy/pwndbg.git
git@gitee.com:gjy/pwndbg.git
gjy
pwndbg
pwndbg
add-single-value-cache

搜索帮助