Skip to content

Commit bffff90

Browse files
authored
Updated pylintrc to version 4.0 (#1273)
1 parent bf52582 commit bffff90

10 files changed

Lines changed: 98 additions & 67 deletions

File tree

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
env:
3232
DEBIAN_FRONTEND: noninteractive
3333
run: |
34-
apt-get update -q
35-
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
34+
apt update -q
35+
apt install -y libterm-readline-gnu-perl locales software-properties-common
3636
locale-gen en_US.UTF-8
3737
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
3838
- name: Install dependencies
@@ -42,8 +42,8 @@ jobs:
4242
add-apt-repository -y universe
4343
add-apt-repository -y ppa:deadsnakes/ppa
4444
add-apt-repository -y ppa:gift/dev
45-
apt-get update -q
46-
apt-get install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
45+
apt update -q
46+
apt install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
4747
- name: Run linter
4848
env:
4949
LANG: en_US.UTF-8

.github/workflows/test_docker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
version: ['43']
10+
version: ['44']
1111
container:
1212
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
1313
steps:
@@ -46,15 +46,15 @@ jobs:
4646
env:
4747
DEBIAN_FRONTEND: noninteractive
4848
run: |
49-
apt-get update -q
50-
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
49+
apt update -q
50+
apt install -y libterm-readline-gnu-perl locales software-properties-common
5151
locale-gen en_US.UTF-8
5252
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
5353
- name: Install dependencies
5454
run: |
5555
add-apt-repository -y ppa:gift/dev
56-
apt-get update -q
57-
apt-get install -y build-essential python3 python3-build python3-dev python3-pip python3-setuptools python3-venv python3-wheel
56+
apt update -q
57+
apt install -y build-essential python3 python3-build python3-dev python3-pip python3-setuptools python3-venv python3-wheel
5858
- name: Run tests
5959
env:
6060
LANG: en_US.UTF-8

.github/workflows/test_tox.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
env:
2929
DEBIAN_FRONTEND: noninteractive
3030
run: |
31-
apt-get update -q
32-
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
31+
apt update -q
32+
apt install -y libterm-readline-gnu-perl locales software-properties-common
3333
locale-gen en_US.UTF-8
3434
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
3535
- name: Install dependencies
@@ -39,8 +39,8 @@ jobs:
3939
add-apt-repository -y universe
4040
add-apt-repository -y ppa:deadsnakes/ppa
4141
add-apt-repository -y ppa:gift/dev
42-
apt-get update -q
43-
apt-get install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
42+
apt update -q
43+
apt install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
4444
- name: Run tests
4545
env:
4646
LANG: en_US.UTF-8
@@ -59,8 +59,8 @@ jobs:
5959
env:
6060
DEBIAN_FRONTEND: noninteractive
6161
run: |
62-
apt-get update -q
63-
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
62+
apt update -q
63+
apt install -y libterm-readline-gnu-perl locales software-properties-common
6464
locale-gen en_US.UTF-8
6565
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
6666
- name: Install dependencies
@@ -70,8 +70,8 @@ jobs:
7070
add-apt-repository -y universe
7171
add-apt-repository -y ppa:deadsnakes/ppa
7272
add-apt-repository -y ppa:gift/dev
73-
apt-get update -q
74-
apt-get install -y build-essential curl git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
73+
apt update -q
74+
apt install -y build-essential curl git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
7575
- name: Run tests with coverage
7676
env:
7777
LANG: en_US.UTF-8

.pylintrc

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Pylint 3.2.x configuration file
1+
[MAIN]
2+
# Pylint 4.0.x configuration file
23
#
34
# This file is generated by l2tdevtools update-dependencies.py, any dependency
45
# related changes should be made in dependencies.ini.
5-
[MAIN]
66

77
# Analyse import fallback blocks. This can be used to support both Python 2 and
88
# 3 compatible code, which means that the block might have code that exists
@@ -29,7 +29,6 @@ clear-cache-post-run=no
2929
# A comma-separated list of package or module names from where C extensions may
3030
# be loaded. Extensions are loading into the active Python interpreter and may
3131
# run arbitrary code.
32-
# extension-pkg-allow-list=
3332
extension-pkg-allow-list=
3433

3534
# A comma-separated list of package or module names from where C extensions may
@@ -87,7 +86,6 @@ limit-inference-results=100
8786

8887
# List of plugins (as comma separated values of python module names) to load,
8988
# usually to register additional checkers.
90-
# load-plugins=
9189
load-plugins=pylint.extensions.docparams
9290

9391
# Pickle collected data for later comparisons.
@@ -99,7 +97,7 @@ prefer-stubs=no
9997

10098
# Minimum Python version to use for version dependent checks. Will default to
10199
# the version used to run pylint.
102-
py-version=3.12
100+
py-version=3.14
103101

104102
# Discover python modules and packages in the file system subtree.
105103
# recursive=no
@@ -111,10 +109,6 @@ recursive=yes
111109
# source root.
112110
source-roots=
113111

114-
# When enabled, pylint would attempt to guess common misconfiguration and emit
115-
# user-friendly hints instead of false-positive error messages.
116-
suggestion-mode=yes
117-
118112
# Allow loading of arbitrary C extensions. Extensions are imported into the
119113
# active Python interpreter and may run arbitrary code.
120114
unsafe-load-any-extension=no
@@ -250,6 +244,11 @@ name-group=
250244
# not require a docstring.
251245
no-docstring-rgx=^_
252246

247+
# Regular expression matching correct parameter specification variable names.
248+
# If left empty, parameter specification variable names will be checked with
249+
# the set naming style.
250+
#paramspec-rgx=
251+
253252
# List of decorators that produce properties, such as abc.abstractproperty. Add
254253
# to this list to register other decorators that produce valid properties.
255254
# These decorators are taken in consideration only for invalid-name.
@@ -263,6 +262,10 @@ property-classes=abc.abstractproperty
263262
# variable names will be checked with the set naming style.
264263
#typevar-rgx=
265264

265+
# Regular expression matching correct type variable tuple names. If left empty,
266+
# type variable tuple names will be checked with the set naming style.
267+
#typevartuple-rgx=
268+
266269
# Naming style matching correct variable names.
267270
variable-naming-style=snake_case
268271

@@ -293,7 +296,6 @@ exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
293296
valid-classmethod-first-arg=cls
294297

295298
# List of valid names for the first argument in a metaclass class method.
296-
# valid-metaclass-classmethod-first-arg=mcs
297299
valid-metaclass-classmethod-first-arg=cls
298300

299301

@@ -308,7 +310,6 @@ exclude-too-few-public-methods=
308310
ignored-parents=
309311

310312
# Maximum number of arguments for function / method.
311-
# max-args=5
312313
max-args=10
313314

314315
# Maximum number of attributes for a class (see R0902).
@@ -326,6 +327,9 @@ max-locals=15
326327
# Maximum number of parents for a class (see R0901).
327328
max-parents=7
328329

330+
# Maximum number of positional arguments for function / method.
331+
max-positional-arguments=10
332+
329333
# Maximum number of public methods for a class (see R0904).
330334
max-public-methods=20
331335

@@ -360,8 +364,9 @@ indent-after-paren=4
360364
# tab).
361365
indent-string=' '
362366

363-
# Maximum number of characters on a single line.
364-
# max-line-length=100
367+
# Maximum number of characters on a single line. Pylint's default of 100 is
368+
# based on PEP 8's guidance that teams may choose line lengths up to 99
369+
# characters.
365370
max-line-length=88
366371

367372
# Maximum number of lines in a module.
@@ -481,7 +486,6 @@ disable=assignment-from-none,
481486
# either give multiple identifier separated by comma (,) or put this option
482487
# multiple time (only on the command line, not in the configuration file where
483488
# it should appear only once). See also the "--disable" option for examples.
484-
# enable=
485489
enable=c-extension-no-member
486490

487491

@@ -494,6 +498,9 @@ timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.
494498

495499
[MISCELLANEOUS]
496500

501+
# Whether or not to search for fixme's in docstrings.
502+
check-fixme-in-docstring=no
503+
497504
# List of note tags to take in consideration, separated by a comma.
498505
notes=FIXME,
499506
XXX,
@@ -533,17 +540,16 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
533540
# used to format the message information. See doc for all details.
534541
msg-template=
535542

536-
# Set the output format. Available formats are: text, parseable, colorized,
537-
# json2 (improved json format), json (old json format) and msvs (visual
538-
# studio). You can also give a reporter class, e.g.
539-
# mypackage.mymodule.MyReporterClass.
543+
# Set the output format. Available formats are: 'text', 'parseable',
544+
# 'colorized', 'json2' (improved json format), 'json' (old json format), msvs
545+
# (visual studio) and 'github' (GitHub actions). You can also give a reporter
546+
# class, e.g. mypackage.mymodule.MyReporterClass.
540547
#output-format=
541548

542549
# Tells whether to display a full report or only the messages.
543550
reports=no
544551

545552
# Activate the evaluation score.
546-
# score=yes
547553
score=no
548554

549555

@@ -598,7 +604,7 @@ spelling-store-unknown-words=no
598604

599605
# This flag controls whether inconsistent-quotes generates a warning when the
600606
# character used as a quote delimiter is used inconsistently within a module.
601-
check-quote-consistency=yes
607+
check-quote-consistency=no
602608

603609
# This flag controls whether the implicit-str-concat should generate a warning
604610
# on implicit string concatenation in sequences defined over several lines.
@@ -644,7 +650,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
644650
# of finding the hint is based on edit distance.
645651
missing-member-hint=yes
646652

647-
# The minimum edit distance a name should have in order to be considered a
653+
# The maximum edit distance a name should have in order to be considered a
648654
# similar match for a missing member name.
649655
missing-member-hint-distance=1
650656

data/projects.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ description_long: Python bindings to Yann Collet ZSTD compression library.
11411141
11421142
[pytsk3]
11431143
architecture_dependent: true
1144+
build_system: setuptools
11441145
version: >=20160311
11451146
rpm_build_dependencies: gcc-c++,libstdc++-devel
11461147
rpm_template_spec: pytsk3.spec

data/rpm_templates/pytsk3.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Prefix: %{{_prefix}}
1414
Vendor: Michael Cohen and Joachim Metz <scudette@gmail.com, joachim.metz@gmail.com>
1515
Packager: Joachim Metz <joachim.metz@gmail.com>
1616
Url: https://github.com/py4n6/pytsk/
17-
BuildRequires: gcc, python3-devel, python3-setuptools, gcc-c++, libstdc++-devel
17+
BuildRequires: gcc, gcc-c++, libstdc++-devel, python3-devel, python3-pip, python3-setuptools
1818

1919
%description
2020
Python bindings for the sleuthkit (http://www.sleuthkit.org/)
@@ -43,6 +43,8 @@ rm -rf %{{buildroot}}
4343
%doc README
4444
%{{_libdir}}/python3*/site-packages/pytsk3*.so
4545
%{{_libdir}}/python3*/site-packages/pytsk3*.dist-info
46+
%exclude %{{_libdir}}/python3*/site-packages/_build.py
47+
%exclude %{{_libdir}}/python3*/site-packages/__pycache__
4648

4749
%changelog
4850
* {date_time} log2timeline development team <log2timeline-dev@googlegroups.com> {version}-1

0 commit comments

Comments
 (0)