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

Python - Tools: Running black on all remaining files (plus isort) #6825

Merged
merged 2 commits into from
Sep 19, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tools/readmes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"device-farm": "python/example_code/devicefarm",
"elastic-load-balancing-v2": "python/example_code/elastic-load-balancing",
"secrets-manager": "python/example_code/secretsmanager",
"dynamodb": "python/example_code/dynamodb"
"dynamodb": "python/example_code/dynamodb",
},
}
},
Expand Down
14 changes: 9 additions & 5 deletions .tools/readmes/render.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from collections import defaultdict
import datetime
import logging
import os
import re
from collections import defaultdict
from dataclasses import asdict
from enum import Enum
from jinja2 import Environment, FileSystemLoader, select_autoescape
from operator import itemgetter
from pathlib import Path
from typing import Dict, List, Tuple

import config
from aws_doc_sdk_examples_tools.metadata import Example
from aws_doc_sdk_examples_tools.sdks import Sdk
from aws_doc_sdk_examples_tools.services import Service

import config
from jinja2 import Environment, FileSystemLoader, select_autoescape
from scanner import Scanner

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -275,7 +274,12 @@ def render(self) -> RenderStatus:
custom_cats = self._transform_custom_categories()

if (
len(hello) + len(actions) + len(basics) + len(scenarios) + len(custom_cats) + len(crosses)
len(hello)
+ len(actions)
+ len(basics)
+ len(scenarios)
+ len(custom_cats)
+ len(crosses)
== 0
):
return RenderStatus.NO_EXAMPLES
Expand Down
2 changes: 1 addition & 1 deletion .tools/readmes/scanner.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import config
import logging
from collections import defaultdict
from os.path import relpath
from pathlib import Path
from typing import Dict, List, Iterable, Optional, TypeVar

import config
from aws_doc_sdk_examples_tools.doc_gen import DocGen
from aws_doc_sdk_examples_tools.metadata import Example
from aws_doc_sdk_examples_tools.sdks import Sdk
Expand Down
2 changes: 1 addition & 1 deletion .tools/readmes/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import logging
from pathlib import Path
from subprocess import run, DEVNULL, PIPE, CalledProcessError
from subprocess import DEVNULL, PIPE, CalledProcessError, run
from sys import executable


Expand Down
2 changes: 1 addition & 1 deletion .tools/readmes/writeme.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
# importing the things that got changed during update.
from runner import main

sys.exit(main())
sys.exit(main())
Loading