mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
b8ba78f1d6
checkov build has been broken since
https://hydra.nixos.org/build/187798638 due to a minor incompatibility
with flake8 5.x on Python 3.8+; this remedies it.
Upstream does not notice this issue presently since they only run unit tests
against Python 3.7, and positional-only arguments did not appear till
3.8.
See
f98d52a398
for details on the change.
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
diff --git a/flake8_plugins/flake8_class_attributes_plugin/tests/conftest.py b/flake8_plugins/flake8_class_attributes_plugin/tests/conftest.py
|
|
index 1ad762aed..c91078dcf 100644
|
|
--- a/flake8_plugins/flake8_class_attributes_plugin/tests/conftest.py
|
|
+++ b/flake8_plugins/flake8_class_attributes_plugin/tests/conftest.py
|
|
@@ -1,6 +1,7 @@
|
|
import ast
|
|
import os
|
|
|
|
+import flake8
|
|
from flake8.options.manager import OptionManager
|
|
|
|
from flake8_plugins.flake8_class_attributes_plugin.flake8_class_attributes.checker import ClassAttributesChecker
|
|
@@ -17,7 +18,11 @@ def run_validator_for_test_file(filename, max_annotations_complexity=None,
|
|
raw_content = file_handler.read()
|
|
tree = ast.parse(raw_content)
|
|
|
|
- options = OptionManager('flake8_class_attributes_order', '0.1.3')
|
|
+ options = OptionManager(
|
|
+ version=flake8.__version__,
|
|
+ plugin_versions='flake8_class_attributes_order: 0.1.3',
|
|
+ parents=[],
|
|
+ )
|
|
options.use_class_attributes_order_strict_mode = strict_mode
|
|
options.class_attributes_order = attributes_order
|
|
ClassAttributesChecker.parse_options(options)
|