Skip to content

Commit c67f92c

Browse files
committed
lint
1 parent 0274ae3 commit c67f92c

File tree

6 files changed

+25
-21
lines changed

6 files changed

+25
-21
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def get_long_description() -> str:
9191
"tests": TESTS_REQUIRES,
9292
# This list can be extended with cloud providers
9393
# used by the webviz-config open source community:
94-
"azure": ["azure-storage-blob>=12.5"],
94+
"azure": ["azure-cli>=2.14", "azure-storage-blob>=12.5"],
9595
},
9696
setup_requires=["setuptools_scm~=3.2"],
9797
python_requires="~=3.6",

webviz_config/_dockerize/_azure_cli.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
from knack.util import CLIError
88
from msrestazure.azure_exceptions import CloudError
99

10-
PIMCOMMON_URL = "https://portal.azure.com/#blade/Microsoft_Azure_PIMCommon/ActivationMenuBlade/aadmigratedroles"
10+
PIMCOMMON_URL = (
11+
"https://portal.azure.com/#blade/Microsoft_Azure_PIMCommon/"
12+
"ActivationMenuBlade/aadmigratedroles"
13+
)
1114

1215

1316
def _azure_cli(args: List[str]) -> dict:

webviz_config/_dockerize/_create_docker_setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ def get_python_requirements(distributions, build_directory):
5959

6060
if dist["download_url"].startswith(PYPI_URL_ROOT):
6161
pypi_data = requests.get(f"{PYPI_URL_ROOT}/pypi/{dist_name}/json").json()
62-
pypi_releases = pypi_data["releases"].keys()
6362
if dist["version"] in pypi_data["releases"]:
64-
requirements.append(f"{dist_named}=={dist['version']}")
63+
requirements.append(f"{dist_name}=={dist['version']}")
6564
continue
6665

6766
if dist["source_url"] is None:

webviz_config/_dockerize/_create_radix_setup.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
import jinja2
2-
3-
4-
def create_radix_setup(build_directory):
5-
6-
template_environment = jinja2.Environment( # nosec
7-
loader=jinja2.PackageLoader("webviz_config", "templates"),
8-
undefined=jinja2.StrictUndefined,
9-
autoescape=False,
10-
)
11-
template = template_environment.get_template("radixconfig.yaml.jinja2")
12-
13-
(build_directory / "radixconfig.yaml").write_text(template.render({}))
14-
15-
161
"""
172
183
webviz deploy radix . repository --app_registration_name AN --radix_name RN --playground
@@ -44,3 +29,17 @@ def create_radix_setup(build_directory):
4429
5) Update repository.
4530
4631
"""
32+
33+
import jinja2
34+
35+
36+
def create_radix_setup(build_directory):
37+
38+
template_environment = jinja2.Environment( # nosec
39+
loader=jinja2.PackageLoader("webviz_config", "templates"),
40+
undefined=jinja2.StrictUndefined,
41+
autoescape=False,
42+
)
43+
template = template_environment.get_template("radixconfig.yaml.jinja2")
44+
45+
(build_directory / "radixconfig.yaml").write_text(template.render({}))

webviz_config/_dockerize/dash_help.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def layout(self):
4242
azure_subscription = WorkflowStepLayout(
4343
"Choose Azure subscription",
4444
1,
45-
"Subscription is the topmost grouping concept of Azure resources. Choose the one approriate for your application.",
45+
"Subscription is the topmost grouping concept of Azure resources."
46+
"Choose the one approriate for your application.",
4647
children=[
4748
dcc.Dropdown(
4849
id="azure-subscription-dropdown",

webviz_config/cloud_vendors/azure_storage.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def __init__(self) -> None:
1515
container_name=os.environ["AZURE_STORAGE_CONTAINER_NAME"],
1616
)
1717

18-
def _get_file_object(self, path: str, binary_mode: bool = True) -> typing.IO: # type: ignore[override]
18+
def _get_file_object(
19+
self, path: str, binary_mode: bool = True
20+
) -> typing.IO: # type: ignore[override]
1921

2022
bytes_io = io.BytesIO()
2123
self._container_client.download_blob(path).readinto(bytes_io)

0 commit comments

Comments
 (0)