Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates as a result of black 24.1.0 #3038

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions src/cfnlint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging

import cfnlint.conditions
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging
import sys
import warnings
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from typing import List

from cfnlint.config import configure_logging
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/conditions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.conditions.conditions import Conditions
1 change: 1 addition & 0 deletions src/cfnlint/conditions/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import hashlib
import json

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/conditions/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from typing import Any, Dict, List, Mapping, Optional, Union

from sympy import And, Not, Or, Symbol
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/conditions/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import itertools
import logging
import traceback
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/conditions/equals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import json
import logging
from typing import Any, Dict, List, Mapping, Tuple, Union
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import argparse
import copy
import glob
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import json
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/decode/cfn_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import fileinput
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/decode/cfn_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import fileinput
import logging
import sys
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/decode/decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging
from json.decoder import JSONDecodeError
from typing import Callable, List, Optional, Tuple, Union
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/decode/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging
from copy import deepcopy

Expand Down
9 changes: 6 additions & 3 deletions src/cfnlint/formatters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import itertools
import json
import operator
Expand Down Expand Up @@ -329,9 +330,11 @@ def print_matches(self, matches, rules=None, filenames=None):
full_description=sarif.MultiformatMessageString(
text=rules_map[rule_id].description
),
help_uri=rules_map[rule_id].source_url
if rules_map[rule_id]
else "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/rules.md",
help_uri=(
rules_map[rule_id].source_url
if rules_map[rule_id]
else "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/rules.md"
),
)
for rule_id in matched_rules
]
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging
import warnings
from typing import Any, List
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import datetime
import fnmatch
import gzip
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import fnmatch
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import importlib
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import regex as re

from cfnlint.helpers import LIMITS, REGEX_ALPHANUMERIC
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/And.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules.conditions.common import check_condition_list

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/Equals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.helpers import VALID_PARAMETER_TYPES_LIST
from cfnlint.rules import CloudFormationLintRule, RuleMatch

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/EqualsIsUseful.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import json

from cfnlint.rules import CloudFormationLintRule, RuleMatch
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/Exists.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/Not.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules.conditions.common import check_condition_list

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/Or.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules.conditions.common import check_condition_list

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/Used.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/conditions/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/custom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

# pylint: disable=cyclic-import
import json

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Base64.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Cidr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import regex as re

from cfnlint.helpers import REGEX_CIDR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import regex as re

import cfnlint.helpers
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/FindInMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/FindInMapKeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/ForEach.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging

from cfnlint.languageExtensions import LanguageExtensions
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/GetAtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import logging

import cfnlint.helpers
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/GetAz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/If.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/ImportValue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Join.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.helpers import RESOURCE_SPECS, VALID_PARAMETER_TYPES_LIST
from cfnlint.rules import CloudFormationLintRule, RuleMatch

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Length.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.languageExtensions import LanguageExtensions
from cfnlint.rules import CloudFormationLintRule, RuleMatch

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Not.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/RefExist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

import regex as re

from cfnlint.rules import CloudFormationLintRule, RuleMatch
Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/RefInCondition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/RelationshipConditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.helpers import PSEUDOPARAMS
from cfnlint.rules import CloudFormationLintRule, RuleMatch

Expand Down
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/Select.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

from cfnlint.rules import CloudFormationLintRule, RuleMatch


Expand Down
Loading
Loading