Skip to content

Commit

Permalink
Revert "Remove walrus operators to be less-incompatible with py37 (di…
Browse files Browse the repository at this point in the history
…als#2299)"

This reverts commit 2ffab21.
  • Loading branch information
graeme-winter committed Dec 13, 2022
1 parent d177bc2 commit c51410c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions doc/sphinx/update_release_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def github_api_get(url: str, **kwargs) -> Any:
**args.pop("headers", {}),
}
# If we've set an environment variable, use the token
token = os.environ.get("GITHUB_TOKEN", None)
if token:
if token := os.environ.get("GITHUB_TOKEN", None):
headers["Authorization"] = f"token {token}"
req = requests.get(url, headers=headers, **args)
req.raise_for_status()
Expand Down
3 changes: 1 addition & 2 deletions libtbx_refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@

# Now, check to see if we configured XFEL first. If so, this is an error and we
# have a mis-configured environment.
xfel_module = libtbx.env.module_dict.get("xfel")
if xfel_module:
if xfel_module := libtbx.env.module_dict.get("xfel"):
dials_module = libtbx.env.module_dict.get("dials")
if libtbx.env.module_list.index(xfel_module) < libtbx.env.module_list.index(
dials_module
Expand Down
1 change: 0 additions & 1 deletion newsfragments/2299.misc

This file was deleted.

0 comments on commit c51410c

Please sign in to comment.