Skip to content

Commit

Permalink
Updated pylintrc to version 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Dec 26, 2024
1 parent cfb62cb commit faaca7c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
toxenv: 'py311,wheel'
- python-version: '3.12'
toxenv: 'py312,wheel'
- python-version: '3.13'
toxenv: 'py313,wheel'
container:
image: ubuntu:22.04
steps:
Expand Down
24 changes: 18 additions & 6 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pylint 3.0.x configuration file
# Pylint 3.2.x configuration file
#
# This file is generated by l2tdevtools update-dependencies.py, any dependency
# related changes should be made in dependencies.ini.
Expand Down Expand Up @@ -29,6 +29,7 @@ clear-cache-post-run=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
# extension-pkg-allow-list=
extension-pkg-allow-list=

# A comma-separated list of package or module names from where C extensions may
Expand Down Expand Up @@ -63,10 +64,11 @@ ignore-paths=
# Emacs file locks
ignore-patterns=^\.#

# 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.
# List of module names for which member attributes should not be checked and
# will not be imported (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=

# Python code to execute, usually for sys.path manipulation such as
Expand All @@ -85,11 +87,16 @@ limit-inference-results=100

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

# Pickle collected data for later comparisons.
persistent=yes

# Resolve imports to .pyi stubs if available. May reduce no-member messages and
# increase not-an-iterable messages.
prefer-stubs=no

# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.12
Expand Down Expand Up @@ -440,7 +447,6 @@ confidence=HIGH,
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".

disable=assignment-from-none,
bad-inline-option,
consider-using-f-string,
Expand Down Expand Up @@ -478,6 +484,7 @@ disable=assignment-from-none,
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
# enable=
enable=c-extension-no-member


Expand Down Expand Up @@ -510,6 +517,11 @@ max-nested-blocks=5
# printed.
never-returning-functions=sys.exit,argparse.parse_error

# Let 'consider-using-join' be raised when the separator to join on would be
# non-empty (resulting in expected fixes of the type: ``"- " + " -
# ".join(items)``)
suggest-join-with-non-empty-separator=yes


[REPORTS]

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ environment:
PYTHON_VERSION: "3.12"
L2TBINARIES_TRACK: "dev"
TARGET: wheel
- DESCRIPTION: "Run tests on Mac OS with Python 3.12"
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
- DESCRIPTION: "Run tests on Mac OS with Python 3.13"
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
TARGET: tests

Expand Down
6 changes: 2 additions & 4 deletions artifacts/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ def ReadDirectory(self, path, extension='yaml'):
glob_spec = os.path.join(path, '*')

for artifact_file in glob.glob(glob_spec):
for artifact_definition in self.ReadFile(artifact_file):
yield artifact_definition
yield from self.ReadFile(artifact_file)

def ReadFile(self, filename):
"""Reads artifact definitions from a file.
Expand All @@ -250,8 +249,7 @@ def ReadFile(self, filename):
ArtifactDefinition: an artifact definition.
"""
with io.open(filename, 'r', encoding='utf-8') as file_object:
for artifact_definition in self.ReadFileObject(file_object):
yield artifact_definition
yield from self.ReadFileObject(file_object)

@abc.abstractmethod
def ReadFileObject(self, file_object):
Expand Down
2 changes: 2 additions & 0 deletions artifacts/scripts/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ def Main():

validator = ArtifactDefinitionsValidator()

result = False

Check warning on line 588 in artifacts/scripts/validator.py

View check run for this annotation

Codecov / codecov/patch

artifacts/scripts/validator.py#L588

Added line #L588 was not covered by tests

if os.path.isdir(options.definitions):
print(f'Validating definitions in: {options.definitions:s}/*.yaml')
result = validator.CheckDirectory(options.definitions)
Expand Down
2 changes: 1 addition & 1 deletion config/appveyor/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
set -e

brew update -q
brew install -q gettext gnu-sed python@3.12 tox || true
brew install -q gettext gnu-sed python@3.13 tox || true

6 changes: 3 additions & 3 deletions config/appveyor/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/gettext/lib ${LDFLAGS}";
export CPPFLAGS="-I/usr/local/opt/[email protected]/include ${CPPFLAGS}";
export LDFLAGS="-L/usr/local/opt/[email protected]/lib ${LDFLAGS}";

# Set the following environment variables to ensure tox can find Python 3.12.
export PATH="/usr/local/opt/python@3.12/bin:${PATH}";
# Set the following environment variables to ensure tox can find Python 3.13.
export PATH="/usr/local/opt/python@3.13/bin:${PATH}";

tox -e py312
tox -e py313
5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = artifacts
version = 20240518
version = 20241226
description = ForensicArtifacts.com Artifact Repository.
long_description = A free, community-sourced, machine-readable knowledge base of forensic artifacts that the world can use both as an information source and within other tools.
long_description_content_type = text/plain
Expand Down Expand Up @@ -40,6 +40,3 @@ where = .
console_scripts =
stats = artifacts.scripts.stats:Main
validator = artifacts.scripts.validator:Main

[bdist_wheel]
universal = 1
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py3{8,9,10,11,12},coverage,docformatter,docs,lint,wheel
envlist = py3{8,9,10,11,12,13},coverage,docformatter,docs,lint,wheel

[testenv]
allowlist_externals = ./run_tests.py
Expand All @@ -19,7 +19,7 @@ deps =
setuptools >= 65
wheel
commands =
py3{8,9,10,11,12}: ./run_tests.py
py3{8,9,10,11,12,13}: ./run_tests.py
coverage: coverage erase
coverage: coverage run --source=artifacts --omit="*_test*,*__init__*,*test_lib*" run_tests.py
coverage: coverage xml
Expand Down Expand Up @@ -53,7 +53,7 @@ deps =
-rrequirements.txt
-rtest_requirements.txt
docformatter
pylint >= 3.0.0, < 3.1.0
pylint >= 3.2.0, < 3.3.0
setuptools
yamllint >= 1.26.0
commands =
Expand Down

0 comments on commit faaca7c

Please sign in to comment.