Skip to content

Commit 1662e6a

Browse files
committed
fix black formatting
1 parent 0173af7 commit 1662e6a

File tree

8 files changed

+4
-16
lines changed

8 files changed

+4
-16
lines changed

matlab_proxy/app.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ async def set_licensing_info(req):
215215

216216
# Start MATLAB if licensing is complete
217217
if state.is_licensed() is True and not isinstance(state.error, LicensingError):
218-
219218
# Start MATLAB
220219
await state.start_matlab(restart_matlab=True)
221220

@@ -323,7 +322,7 @@ def make_static_route_table(app):
323322

324323
table = {}
325324

326-
for (mod, parent) in [
325+
for mod, parent in [
327326
(gui.__name__, ""),
328327
(gui.static.__name__, "/static"),
329328
(gui.static.css.__name__, "/static/css"),
@@ -333,7 +332,6 @@ def make_static_route_table(app):
333332
for name in resource_listdir(mod, ""):
334333
if not resource_isdir(mod, name):
335334
if name != "__init__.py":
336-
337335
# Special case for manifest.json
338336
if "manifest.json" in name:
339337
content_type = "application/manifest+json"
@@ -387,7 +385,6 @@ async def matlab_view(req):
387385
async with aiohttp.ClientSession(
388386
cookies=req.cookies, connector=aiohttp.TCPConnector(verify_ssl=False)
389387
) as client_session:
390-
391388
async with client_session.ws_connect(
392389
matlab_base_url + req.path_qs,
393390
) as ws_client:
@@ -448,7 +445,6 @@ async def wsforward(ws_from, ws_to):
448445
allow_redirects=False,
449446
data=req_body,
450447
) as res:
451-
452448
headers = res.headers.copy()
453449
body = await res.read()
454450
headers.update(req.app["settings"]["mwi_custom_http_headers"])

matlab_proxy/app_state.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ async def set_licensing_mhlm(
256256
"""
257257

258258
try:
259-
260259
token_data = await mw.fetch_expand_token(
261260
self.settings["mwa_api_endpoint"], identity_token, source_id
262261
)
@@ -415,7 +414,6 @@ def prepare_lock_files_for_MATLAB_launch(self):
415414
):
416415
return 31515
417416
else:
418-
419417
# TODO If MATLAB Connector is enhanced to allow any port, then the
420418
# following can be used to get an unused port instead of the for loop and
421419
# try-except.

matlab_proxy/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def get(config_name=matlab_proxy.get_default_config_name(), dev=False):
111111
# If running tests using Pytest, it will set environment variable TEST to true before running tests.
112112
# Will make test env specific changes before returning the settings.
113113
if mwi_env.is_testing_mode_enabled():
114-
115114
# Set ready_delay value to 0 for faster fake MATLAB startup.
116115
ready_delay = ["--ready-delay", "0"]
117116
matlab_cmd = settings["matlab_cmd"]

matlab_proxy/util/mw.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ async def fetch_entitlements(mhlm_api_endpoint, access_token, matlab_release):
5959
}
6060
),
6161
) as res:
62-
6362
if res.reason != "OK":
6463
raise OnlineLicensingError(
6564
f"Communication with {mhlm_api_endpoint} failed ({res.status}). For more details, see {__get_licensing_url()}."
@@ -115,7 +114,6 @@ async def fetch_expand_token(mwa_api_endpoint, identity_token, source_id):
115114
}
116115
),
117116
) as res:
118-
119117
if res.reason != "OK":
120118
raise OnlineLicensingError(
121119
f"Communication with {mwa_api_endpoint} failed ({res.status}). For more details, see {__get_licensing_url()}."
@@ -163,7 +161,6 @@ async def fetch_access_token(mwa_api_endpoint, identity_token, source_id):
163161
}
164162
),
165163
) as res:
166-
167164
if res.reason != "OK":
168165
raise OnlineLicensingError(
169166
f"Communication with {mwa_api_endpoint} failed ({res.status}). For more details, see {__get_licensing_url()}."

matlab_proxy/util/mwi/embedded_connector/request.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ async def send_request(url: str, data: dict, method: str, headers: dict = None)
4343
method=method, url=url, data=data, headers=None, ssl=False
4444
) as resp:
4545
if resp.reason != "OK":
46-
4746
# Converting to dict and formatting for printing
4847
data = json.loads(data)
4948

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
class InstallNpm(install):
1414
def run(self):
15-
1615
# Ensure npm is present
1716
npm_path = which("npm")
1817
if not npm_path:
@@ -43,7 +42,7 @@ def run(self):
4342

4443
# In order to be accessible in the package, turn the built gui into modules
4544
(Path(target_dir) / "__init__.py").touch(exist_ok=True)
46-
for (path, directories, filenames) in os.walk(target_dir):
45+
for path, directories, filenames in os.walk(target_dir):
4746
for directory in directories:
4847
(Path(path) / directory / "__init__.py").touch(exist_ok=True)
4948

tests/test_non_dev_mode.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def build_frontend_fixture():
6060
pass
6161

6262
finally:
63-
6463
# Create static files
6564
os.mkdir(static_files_dir)
6665
with open(Path(static_files_dir) / "index.html", "w") as f:
@@ -100,7 +99,7 @@ def build_frontend_fixture():
10099

101100
(Path(static_files_dir) / "__init__.py").touch(exist_ok=True)
102101

103-
for (path, directories, filenames) in os.walk(static_files_dir):
102+
for path, directories, filenames in os.walk(static_files_dir):
104103
for directory in directories:
105104
(Path(path) / directory / "__init__.py").touch(exist_ok=True)
106105

tests/util/inf_loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
loop = asyncio.get_event_loop()
1515

16+
1617
# Runs infinite loop asynchronously
1718
async def inf_loop(process_no):
1819
process_no += 1

0 commit comments

Comments
 (0)