Skip to content
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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "d6b86e07efa31959f43e99ba32d323cf76736a05",
"commit": "ff0522bc171a1fc63022ed2a371f70669173012e",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down Expand Up @@ -32,7 +32,7 @@
".github/workflows/sub_package_update.yml"
],
"_template": "https://github.com/sunpy/package-template",
"_commit": "d6b86e07efa31959f43e99ba32d323cf76736a05"
"_commit": "ff0522bc171a1fc63022ed2a371f70669173012e"
}
},
"directory": null
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.6"
rev: "v0.9.1"
hooks:
- id: ruff
args: ['--fix', '--unsafe-fixes']
Expand Down
2 changes: 1 addition & 1 deletion drms/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, config=None, **kwargs):
d[url_key] = urljoin(cgi_baseurl, cgi_value)

def __repr__(self):
return f'<ServerConfig: {self._d.get("name")}>'
return f"<ServerConfig: {self._d.get('name')}>"

def __dir__(self):
return dir(type(self)) + list(self.__dict__.keys()) + list(self._valid_keys)
Expand Down
12 changes: 6 additions & 6 deletions drms/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def series_struct(self, ds):
result : dict
Dictionary containing information about the data series.
"""
query = f'?{urlencode({"op": "series_struct", "ds": ds})}'
query = f"?{urlencode({'op': 'series_struct', 'ds': ds})}"
req = self._json_request(self._server.url_jsoc_info + query)
return req.data

Expand All @@ -178,7 +178,7 @@ def rs_summary(self, ds):
result : dict
Dictionary containing 'count', 'status' and 'runtime'.
"""
query = f'?{urlencode({"op": "rs_summary", "ds": ds})}'
query = f"?{urlencode({'op': 'rs_summary', 'ds': ds})}"
req = self._json_request(self._server.url_jsoc_info + query)
return req.data

Expand Down Expand Up @@ -355,9 +355,9 @@ def _exp_request_url(
raise ValueError(f"Unknown protocol argument: {k}")
protocol += ",CT={ct},scaling={scaling},size={size}".format(**extra_keys)
if "min" in extra_keys:
protocol += f',min={extra_keys["min"]:g}'
protocol += f",min={extra_keys['min']:g}"
if "max" in extra_keys:
protocol += f',max={extra_keys["max"]:g}'
protocol += f",max={extra_keys['max']:g}"
else:
if protocol_args is not None:
raise ValueError(f"protocol_args not supported for protocol {protocol}")
Expand Down Expand Up @@ -393,7 +393,7 @@ def _exp_request_url(
raise ValueError(f"{p} is not one of the allowed processing options: {allowed_processes}")
process_strings[p] = ",".join([f"{k}={v}" for k, v in opts.items()])
processes = "|".join([f"{k},{v}" for k, v in process_strings.items()])
d["process=n"] = f'{d["process=n"]}|{processes}'
d["process=n"] = f"{d['process=n']}|{processes}"

if requester is None:
d["requester"] = notify.split("@")[0]
Expand All @@ -417,6 +417,6 @@ def exp_status(self, requestid):
result : dict
Dictionary containing the export request status.
"""
query = f'?{urlencode({"op": "exp_status", "requestid": requestid})}'
query = f"?{urlencode({'op': 'exp_status', 'requestid': requestid})}"
req = self._json_request(self._server.url_jsoc_fetch + query)
return req.data
2 changes: 1 addition & 1 deletion examples/list_hmi_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# Print series names, prime-keys (pkeys) and notes
for series in hmi_series.index:
print("Series:", hmi_series.name[series])
print(" Notes:", (f'\n{8 * " "}').join(textwrap.wrap(hmi_series.note[series])))
print(" Notes:", (f"\n{8 * ' '}").join(textwrap.wrap(hmi_series.note[series])))
Loading