Skip to content

Commit

Permalink
Updated pylintrc to version 3.2 (log2timeline#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Oct 6, 2024
1 parent 6b1a063 commit 1bf0949
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 10 deletions.
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=pybde,pycaes,pyewf,pyfcrypto,pyfsapfs,pyfsext,pyfsfat,pyfshfs,pyfsntfs,pyfsxfs,pyfvde,pyfwnt,pyluksde,pymodi,pyphdi,pyqcow,pysigscan,pysmdev,pysmraw,pytsk3,pyvhdi,pyvmdk,pyvsapm,pyvsgpt,pyvshadow,pyvslvm,xattr

# 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
1 change: 1 addition & 0 deletions dfvfs/encryption/aes_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def Decrypt(self, encrypted_data, finalize=False):
remaining_encrypted_data = encrypted_data[-block_offset:]
encrypted_data = encrypted_data[:-block_offset]

decrypted_data = b''
if self._cipher_mode == definitions.ENCRYPTION_MODE_CBC:
decrypted_data = pycaes.crypt_cbc(
self._aes_context, pycaes.crypt_modes.DECRYPT,
Expand Down
1 change: 1 addition & 0 deletions dfvfs/encryption/blowfish_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def Decrypt(self, encrypted_data, finalize=False):
remaining_encrypted_data = encrypted_data[-block_offset:]
encrypted_data = encrypted_data[:-block_offset]

decrypted_data = b''
if self._cipher_mode == definitions.ENCRYPTION_MODE_CBC:
decrypted_data = pyfcrypto.crypt_blowfish_cbc(
self._blowfish_context, pyfcrypto.crypt_modes.DECRYPT,
Expand Down
1 change: 1 addition & 0 deletions dfvfs/encryption/des3_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def Decrypt(self, encrypted_data, finalize=False):
remaining_encrypted_data = encrypted_data[-block_offset:]
encrypted_data = encrypted_data[:-block_offset]

decrypted_data = b''
if self._cipher_mode == definitions.ENCRYPTION_MODE_CBC:
decrypted_data = pyfcrypto.crypt_des3_cbc(
self._des3_context, pyfcrypto.crypt_modes.DECRYPT,
Expand Down
1 change: 1 addition & 0 deletions dfvfs/lib/cpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def _ReadFileEntry(self, file_object, file_offset):
Raises:
FileFormatError: if the file entry cannot be read.
"""
data_type_map = None
if self.file_format == 'bin-big-endian':
data_type_map = self._CPIO_BINARY_BIG_ENDIAN_FILE_ENTRY
elif self.file_format == 'bin-little-endian':
Expand Down
2 changes: 0 additions & 2 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# -*- coding: utf-8 -*-
"""Script to run the tests."""

from __future__ import print_function

import sys
import unittest

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dfvfs
version = 20240505
version = 20241006
description = Digital Forensics Virtual File System (dfVFS).
long_description = dfVFS, or Digital Forensics Virtual File System, provides read-only access to file-system objects from various storage media types and file formats. The goal of dfVFS is to provide a generic interface for accessing file-system objects, for which it uses several back-ends that provide the actual implementation of the various storage media types, volume systems and file systems.
long_description_content_type = text/plain
Expand Down
2 changes: 2 additions & 0 deletions tests/helpers/volume_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def UnlockEncryptedVolume(
Returns:
bool: True if the volume was unlocked.
"""
password = None

if locked_scan_node.type_indicator == (
definitions.TYPE_INDICATOR_APFS_CONTAINER):
password = self._APFS_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
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 1bf0949

Please sign in to comment.