Skip to content

Commit

Permalink
style: format code with Black and isort
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 659eec1 according to the output
from Black and isort.

Details: #8
  • Loading branch information
deepsource-autofix[bot] authored Nov 29, 2023
1 parent 659eec1 commit 1fff4df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions analyzers/cfn-lint/utils/issue_map_gen.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
import json
import os
import sys


def generate_json(directory):
# Dictionary to hold the mappings
issue_codes = {}
Expand All @@ -10,8 +11,8 @@ def generate_json(directory):
for filename in os.listdir(directory):
if filename.endswith(".toml") and filename.startswith("CFLIN-"):
# Extract the issue code (part after 'CFLIN-' and before '.toml')
issue_code = filename[len("CFLIN-"):-len(".toml")]
issue_code = filename[len("CFLIN-") : -len(".toml")]

# Add to the dictionary
issue_codes[issue_code] = {"issue_code": f"CFLIN-{issue_code}"}

Expand All @@ -23,6 +24,7 @@ def generate_json(directory):
file.write(json_data)
print("JSON data written to issue_map.json")


if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python script.py <directory>")
Expand Down

0 comments on commit 1fff4df

Please sign in to comment.