Skip to content

Commit b788cc9

Browse files
authored
Update/license to short (aws-cloudformation#1189)
* Switch to short license in files Signed-off-by: Kevin DeJong <kddejong@amazon.com>
1 parent 5a54ded commit b788cc9

File tree

404 files changed

+1173
-5748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404 files changed

+1173
-5748
lines changed

docs/getting_started/rules.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,8 @@ Use the following skeleton code as a starting point of your new rule:
4141

4242
```python
4343
"""
44-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
45-
46-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
47-
software and associated documentation files (the "Software"), to deal in the Software
48-
without restriction, including without limitation the rights to use, copy, modify,
49-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
50-
permit persons to whom the Software is furnished to do so.
51-
52-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
53-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
54-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
55-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
56-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
57-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
45+
SPDX-License-Identifier: MIT-0
5846
"""
5947
from cfnlint.rules import CloudFormationLintRule
6048
from cfnlint.rules import RuleMatch
@@ -99,20 +87,8 @@ Use the following skeleton code as a starting point of your new rule:
9987

10088
```python
10189
"""
102-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
103-
104-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
105-
software and associated documentation files (the "Software"), to deal in the Software
106-
without restriction, including without limitation the rights to use, copy, modify,
107-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
108-
permit persons to whom the Software is furnished to do so.
109-
110-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
111-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
112-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
113-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
114-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
115-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
90+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
91+
SPDX-License-Identifier: MIT-0
11692
"""
11793
from cfnlint.rules.MyNewRule import MyNewRule # pylint: disable=E0401
11894
from .. import BaseRuleTestCase

examples/rules/PropertiesTagsIncluded.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
from cfnlint.rules import CloudFormationLintRule
186
from cfnlint.rules import RuleMatch

examples/rules/PropertiesTagsRequired.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
from cfnlint.rules import CloudFormationLintRule
186
from cfnlint.rules import RuleMatch

scripts/update_specs_from_pricing.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
#!/usr/bin/env python
22
"""
3-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
6-
software and associated documentation files (the "Software"), to deal in the Software
7-
without restriction, including without limitation the rights to use, copy, modify,
8-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9-
permit persons to whom the Software is furnished to do so.
10-
11-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
SPDX-License-Identifier: MIT-0
175
"""
186

197
"""

scripts/update_specs_services_from_ssm.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
#!/usr/bin/env python
22
"""
3-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
6-
software and associated documentation files (the "Software"), to deal in the Software
7-
without restriction, including without limitation the rights to use, copy, modify,
8-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9-
permit persons to whom the Software is furnished to do so.
10-
11-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
SPDX-License-Identifier: MIT-0
175
"""
186
import logging
197
import json

setup.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
import codecs
186
import re

src/cfnlint/__init__.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
import logging
186
import sys

src/cfnlint/__main__.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
import sys
186
import logging

src/cfnlint/conditions.py

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
import hashlib
186
from copy import copy
@@ -219,7 +207,8 @@ def __init__(self, cfn):
219207
self.Equals = {}
220208
self.Parameters = {}
221209
try:
222-
self.Equals = self._get_condition_equals(cfn.search_deep_keys(cfnlint.helpers.FUNCTION_EQUALS))
210+
self.Equals = self._get_condition_equals(
211+
cfn.search_deep_keys(cfnlint.helpers.FUNCTION_EQUALS))
223212
for condition_name in cfn.template.get('Conditions', {}):
224213
self.Conditions[condition_name] = Condition(cfn.template, condition_name)
225214
# Configure parametrs Allowed Values if they have them
@@ -228,7 +217,9 @@ def __init__(self, cfn):
228217
if isinstance(parameter_values.get('AllowedValues'), list):
229218
# Any parameter in a condition could be used but would have to be done by
230219
# Ref so build a ref to match for getting an equivalent hash
231-
self.Parameters[get_hash({'Ref': parameter_name})] = parameter_values.get('AllowedValues')
220+
self.Parameters[
221+
get_hash({'Ref': parameter_name})
222+
] = parameter_values.get('AllowedValues')
232223
except Exception as err: # pylint: disable=W0703
233224
LOGGER.debug('While processing conditions got error: %s', err)
234225

@@ -386,7 +377,8 @@ def multiply_equals(currents, s_hash, sets, parameter_values):
386377
# fail safe to not create a lot of unrelated scenarios. Just test if they are true/false
387378
# At this point this value is completely arbitrary and not configurable
388379
if len(conditions) > 4:
389-
LOGGER.info('Found %s conditions. Limiting results to protect against heavy cpu time', len(conditions))
380+
LOGGER.info(
381+
'Found %s conditions. Limiting results to protect against heavy cpu time', len(conditions))
390382
true_results = []
391383
false_results = []
392384
for condition in conditions:
@@ -403,7 +395,8 @@ def multiply_equals(currents, s_hash, sets, parameter_values):
403395
if matched_conditions:
404396
scenarios = []
405397
for con_hash, sets in matched_equals.items():
406-
scenarios = multiply_equals(scenarios, con_hash, sets, self.Parameters.get(con_hash))
398+
scenarios = multiply_equals(scenarios, con_hash, sets,
399+
self.Parameters.get(con_hash))
407400

408401
for scenario in scenarios:
409402
r_condition = {}

src/cfnlint/config.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
"""
2-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5-
software and associated documentation files (the "Software"), to deal in the Software
6-
without restriction, including without limitation the rights to use, copy, modify,
7-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8-
permit persons to whom the Software is furnished to do so.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2+
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
SPDX-License-Identifier: MIT-0
164
"""
175
import sys
186
import argparse
@@ -66,7 +54,8 @@ def __init__(self, schema=None):
6654
self.__user_config_file = None
6755
self.__project_config_file = None
6856
self.file_args = {}
69-
self.default_schema_file = Path(__file__).parent.joinpath('data/CfnLintCli/config/schema.json')
57+
self.default_schema_file = Path(__file__).parent.joinpath(
58+
'data/CfnLintCli/config/schema.json')
7059
with self.default_schema_file.open() as f:
7160
self.default_schema = json.load(f)
7261
self.schema = self.default_schema if not schema else schema
@@ -190,7 +179,8 @@ def merge_config(self, user_config, project_config):
190179
self.merge_config(user_config[key], project_config[key])
191180
else:
192181
user_config[key] = project_config[key]
193-
LOGGER.debug('Overriding User\'s key %s with Project\'s specific value %s.', key, project_config[key])
182+
LOGGER.debug(
183+
'Overriding User\'s key %s with Project\'s specific value %s.', key, project_config[key])
194184

195185
# Project may have unique config we need to copy over too
196186
# so that we can have user+project config available as one
@@ -233,6 +223,7 @@ def _ensure_value(namespace, name, value):
233223

234224
class RuleConfigurationAction(argparse.Action):
235225
""" Override the default Action """
226+
236227
def __init__(self, option_strings, dest, nargs=None, const=None, default=None,
237228
type=None, choices=None, required=False, help=None, metavar=None): # pylint: disable=W0622
238229
super(RuleConfigurationAction, self).__init__(
@@ -290,12 +281,14 @@ def create_parser(self):
290281
"""Do first round of parsing parameters to set options"""
291282
class ArgumentParser(argparse.ArgumentParser):
292283
""" Override Argument Parser so we can control the exit code"""
284+
293285
def error(self, message):
294286
self.print_help(sys.stderr)
295287
self.exit(32, '%s: error: %s\n' % (self.prog, message))
296288

297289
class ExtendAction(argparse.Action):
298290
"""Support argument types that are lists and can be specified multiple times."""
291+
299292
def __call__(self, parser, namespace, values, option_string=None):
300293
items = getattr(namespace, self.dest)
301294
items = [] if items is None else items
@@ -407,6 +400,7 @@ def __call__(self, parser, namespace, values, option_string=None):
407400

408401
class TemplateArgs(object):
409402
""" Per Template Args """
403+
410404
def __init__(self, template_args):
411405
self.set_template_args(template_args)
412406

0 commit comments

Comments
 (0)