Skip to content

Commit 0f80c9d

Browse files
Kurt-von-Lavenmegalinter-bot
authored andcommitted
[MegaLinter] Apply linters fixes
1 parent 29a746e commit 0f80c9d

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

megalinter/config.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env python3
2-
from collections.abc import Mapping, Sequence
32
import json
43
import logging
54
import os
6-
from pathlib import Path, PurePath
75
import shlex
86
import tempfile
7+
from collections.abc import Mapping, Sequence
8+
from pathlib import Path, PurePath
99
from typing import AnyStr, cast
1010
from urllib.parse import ParseResult, urlparse, urlunparse
1111

@@ -20,6 +20,7 @@
2020
)
2121
JsonObject = dict[str, JsonValue]
2222

23+
2324
def init_config(workspace=None):
2425
global CONFIG_DATA, CONFIG_SOURCE
2526
if CONFIG_DATA is not None:
@@ -91,12 +92,12 @@ def init_config(workspace=None):
9192

9293

9394
def combine_config(
94-
workspace: str | None,
95-
config: JsonObject,
96-
combined_config: JsonObject,
97-
config_source: str,
98-
child_uri: ParseResult | None = None
99-
) -> str:
95+
workspace: str | None,
96+
config: JsonObject,
97+
combined_config: JsonObject,
98+
config_source: str,
99+
child_uri: ParseResult | None = None,
100+
) -> str:
100101
workspace_path = Path(workspace) if workspace else None
101102
parsed_uri: ParseResult | None = None
102103
extends = cast(str | Sequence[str], config["EXTENDS"])
@@ -124,17 +125,15 @@ def combine_config(
124125
extends_config_data,
125126
combined_config,
126127
config_source,
127-
parsed_uri
128+
parsed_uri,
128129
)
129130
combined_config.update(config)
130131
return config_source
131132

132133

133134
def download_config(uri: AnyStr) -> JsonObject:
134135
r = requests.get(uri, allow_redirects=True)
135-
assert (
136-
r.status_code == 200
137-
), f"Unable to retrieve EXTENDS config file {uri!r}"
136+
assert r.status_code == 200, f"Unable to retrieve EXTENDS config file {uri!r}"
138137
return yaml.safe_load(r.content)
139138

140139

0 commit comments

Comments
 (0)