File size: 4,413 Bytes
f0f4f2b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
[tool.autoflake]
exclude = "__init__.py"
remove_all_unused_imports = true
[tool.isort]
combine_as_imports = false
extra_standard_library = "pytest"
force_grid_wrap = 1
force_sort_within_sections = true
known_first_party = "libp2p"
known_third_party = "anyio,factory,lru,p2pclient,pytest,noise"
multi_line_output = 3
profile = "black"
skip_glob= "*_pb2*.py, *.pyi"
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = false
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
ignore_missing_imports = true
incremental = false
strict_equality = true
strict_optional = false
warn_redundant_casts = true
warn_return_any = false
warn_unused_configs = true
warn_unused_ignores = true
[tool.pydocstyle]
# All error codes found here:
# http://www.pydocstyle.org/en/3.0.0/error_codes.html
#
# Ignored:
# D1 - Missing docstring error codes
#
# Selected:
# D2 - Whitespace error codes
# D3 - Quote error codes
# D4 - Content related error codes
select = "D2,D3,D4"
# Extra ignores:
# D200 - One-line docstring should fit on one line with quotes
# D203 - 1 blank line required before class docstring
# D204 - 1 blank line required after class docstring
# D205 - 1 blank line required between summary line and description
# D212 - Multi-line docstring summary should start at the first line
# D302 - Use u""" for Unicode docstrings
# D400 - First line should end with a period
# D401 - First line should be in imperative mood
# D412 - No blank lines allowed between a section header and its content
# D415 - First line should end with a period, question mark, or exclamation point
add-ignore = "D200,D203,D204,D205,D212,D302,D400,D401,D412,D415"
# Explanation:
# D400 - Enabling this error code seems to make it a requirement that the first
# sentence in a docstring is not split across two lines. It also makes it a
# requirement that no docstring can have a multi-sentence description without a
# summary line. Neither one of those requirements seem appropriate.
[tool.pytest.ini_options]
addopts = "-v --showlocals --durations 50 --maxfail 10"
log_date_format = "%m-%d %H:%M:%S"
log_format = "%(levelname)8s %(asctime)s %(filename)20s %(message)s"
markers = ["slow: mark test as slow"]
xfail_strict = true
[tool.towncrier]
# Read https://github.com/ethereum/py-libp2p/blob/main/newsfragments/README.md for instructions
directory = "newsfragments"
filename = "docs/release_notes.rst"
issue_format = "`#{issue} <https://github.com/ethereum/py-libp2p/issues/{issue}>`__"
package = "libp2p"
title_format = "py-libp2p v{version} ({project_date})"
underlines = ["-", "~", "^"]
[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
directory = "docs"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "internal"
name = "Internal Changes - for py-libp2p Contributors"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous Changes"
showcontent = false
[[tool.towncrier.type]]
directory = "performance"
name = "Performance Improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Removals"
showcontent = true
[tool.bumpversion]
current_version = "0.2.0"
parse = """
(?P<major>\\d+)
\\.(?P<minor>\\d+)
\\.(?P<patch>\\d+)
(-
(?P<stage>[^.]*)
\\.(?P<devnum>\\d+)
)?
"""
serialize = [
"{major}.{minor}.{patch}-{stage}.{devnum}",
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
tag = true
sign_tags = true
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
[tool.bumpversion.parts.stage]
optional_value = "stable"
first_value = "stable"
values = [
"alpha",
"beta",
"stable",
]
[tool.bumpversion.part.devnum]
[[tool.bumpversion.files]]
filename = "setup.py"
search = "version=\"{current_version}\""
replace = "version=\"{new_version}\""
|