Use pyproject.toml for pylynt configuration

This commit is contained in:
Mikhail f. Shiryaev 2024-03-06 16:43:53 +01:00
parent 859044221f
commit d6325e267c
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4
3 changed files with 5 additions and 45 deletions

View File

@ -1,43 +0,0 @@
# vim: ft=config
[BASIC]
max-module-lines=2000
# due to SQL
max-line-length=200
# Drop/decrease them one day:
max-branches=50
max-nested-blocks=10
max-statements=200
[FORMAT]
ignore-long-lines = (# )?<?https?://\S+>?$
[MESSAGES CONTROL]
disable = missing-docstring,
too-few-public-methods,
invalid-name,
too-many-arguments,
keyword-arg-before-vararg,
too-many-locals,
too-many-instance-attributes,
cell-var-from-loop,
fixme,
too-many-public-methods,
wildcard-import,
unused-wildcard-import,
singleton-comparison,
# pytest.mark.parametrize is not callable (not-callable)
not-callable,
# https://github.com/PyCQA/pylint/issues/3882
# [Python 3.9] Value 'Optional' is unsubscriptable (unsubscriptable-object) (also Union)
unsubscriptable-object,
# Drop them one day:
redefined-outer-name,
broad-except,
bare-except,
no-else-return,
global-statement
[SIMILARITIES]
# due to SQL
min-similarity-lines=1000

View File

@ -59,7 +59,10 @@ def default_clickhouse_odbc_conn_str():
OdbcConnectingArgs.create_from_kw(
dsn="ClickHouse DSN (ANSI)",
Timeout="300",
Url="http://localhost:8123/query?default_format=ODBCDriver2&default_table_engine=MergeTree&union_default_mode=DISTINCT&group_by_use_nulls=1&join_use_nulls=1&allow_create_index_without_type=1&create_index_ignore_unique=1",
Url="http://localhost:8123/query?default_format=ODBCDriver2&"
"default_table_engine=MergeTree&union_default_mode=DISTINCT&"
"group_by_use_nulls=1&join_use_nulls=1&allow_create_index_without_type=1&"
"create_index_ignore_unique=1",
)
)

View File

@ -155,7 +155,7 @@ find $ROOT_PATH/{src,base,programs,utils} -name '*.xml' |
function xargs-pylint {
# $1 is number maximum arguments per pylint process
sort | awk '$2=="text/x-script.python" {print $1}' | \
xargs -P "$(nproc)" -n "$1" pylint --rcfile="$ROOT_PATH/.pylintrc" --persistent=no --score=n
xargs -P "$(nproc)" -n "$1" pylint --rcfile="$ROOT_PATH/pyproject.toml" --persistent=no --score=n
}
find "$ROOT_PATH/tests" -maxdepth 2 -type f -exec file -F' ' --mime-type {} + | xargs-pylint 50