-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
170 lines (158 loc) · 5.89 KB
/
pyproject.toml
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
169
170
# reference: https://github.com/pypa/sampleproject/blob/main/pyproject.toml
[project]
name = "hotkdump"
version = "2024.7.1"
description = "Linux kernel crashdump analysis tool"
readme = "README.md"
requires-python = ">=3.6"
license = { file = "LICENSE" }
keywords = ["crash", "debugging", "kdump"]
dependencies = [ "dataclasses;python_version<'3.7'", "jinja2==3.0.3"]
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 4 - Beta",
# Pick your license as you wish
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
# Specify the Python versions you support here. In particular, ensure
# that you indicate you support Python 3. These classifiers are *not*
# checked by "pip install". See instead "python_requires" below.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
]
[project.optional-dependencies]
testing = [
"pytest>=7",
"pytest-sugar",
"pylint",
"ruff;python_version>'3.6'",
# The below are ubuntu-dev-tools's dependencies but unfortunately
# the requirements.txt file is not referred in setup.py so we have
# to list them here
### SOF `ubuntu-dev-tools` requirements.txt ###
"python-debian",
"python-debianbts",
"distro-info",
"httplib2",
"launchpadlib",
"requests",
"setuptools",
### EOF `ubuntu-dev-tools` requirements.txt ###
"ubuntu-dev-tools@git+https://git.launchpad.net/ubuntu/+source/ubuntu-dev-tools@applied/ubuntu/focal-updates",
]
[project.urls] # Optional
"Homepage" = "https://github.com/canonical/hotkdump"
"Bug Reports" = "https://github.com/canonical/hotkdump/issues"
[project.scripts] # Optional
hotkdump = "hotkdump.main:main"
[build-system]
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["hotkdump", "hotkdump.core"]
#########################################
# Pylint configuration
#########################################
[tool.pylint.format]
max-line-length = 120
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines='^\s*(# )?<?https?://\S+>?$'
#----------------------------------------
[tool.pylint.BASIC]
# Naming style matching correct argument names.
argument-naming-style = 'snake_case'
# Naming style matching correct constant names.
const-naming-style = 'UPPER_CASE'
#----------------------------------------
[tool.pylint.MASTER]
#py-version=3.6
# Specify a score threshold to be exceeded before program exits with error.
fail-under = '10.0'
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore = '.git'
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns = ''
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
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 = 'yes'
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode = 'yes'
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension = 'no'
load-plugins= '''pylint.extensions.redefined_variable_type,
pylint.extensions.for_any_all,
pylint.extensions.overlapping_exceptions,
pylint.extensions.dict_init_mutate,
pylint.extensions.comparison_placement,
pylint.extensions.set_membership,
pylint.extensions.mccabe,
pylint.extensions.check_elif,
pylint.extensions.empty_comment,
pylint.extensions.confusing_elif,
pylint.extensions.eq_without_hash,
pylint.extensions.dunder,
pylint.extensions.consider_refactoring_into_while_condition,
pylint.extensions.code_style,
pylint.extensions.docparams,
pylint.extensions.consider_ternary_expression,
pylint.extensions.typing,
pylint.extensions.no_self_use,
pylint.extensions.docstyle,
pylint.extensions.private_import,
pylint.extensions.magic_value,
pylint.extensions.bad_builtin,
'''
# py3.6 does not support assignment expr.
disable = '''consider-using-assignment-expr
'''
#----------------------------------------
[tool.pylint.REPORTS]
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format = 'colorized'
# Tells whether to display a full report or only the messages.
reports = 'no'
# Activate the evaluation score.
score = 'yes'
#----------------------------------------
[tool.pylint.LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style = 'old'
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules = 'logging'
[tool.pylint.MISCELLANEOUS]
#----------------------------------------
# List of note tags to take in consideration, separated by a comma.
notes = '''FIXME,
XXX,
TODO
'''
[tool.pylint.VARIABLES]
# List of names allowed to shadow builtins
allowed-redefined-builtins=''
#########################################
[tool.ruff]
target-version = "py37"