Skip to content

Commit

Permalink
fix: run pyenv update
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Oct 30, 2024
1 parent edd6cbe commit 96b6595
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests-with-pydebug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ jobs:
- name: Determine Python version
shell: bash
run: |
if [[ "${{ runner.os }}" == 'Windows' ]]; then
pyenv update
fi
pyenv install --list
if [[ "${{ matrix.python-abiflags }}" == *t* ]]; then
PYTHON_VERSION="$(
Expand Down Expand Up @@ -122,6 +125,7 @@ jobs:
PYENV_INSTALL_ARGS+=("--debug")
fi
else
pyenv update
if [[ "${{ matrix.python-abiflags }}" == *d* ]]; then
PYENV_INSTALL_ARGS+=("--dev")
fi
Expand Down
5 changes: 3 additions & 2 deletions optree/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ def _pytree_node_registry_get( # pylint: disable=too-many-return-statements
*,
namespace: str = '',
) -> PyTreeNodeRegistryEntry | None:
handler: PyTreeNodeRegistryEntry | None = None
if namespace is not __GLOBAL_NAMESPACE and namespace != '':
if namespace is __GLOBAL_NAMESPACE:
namespace = ''
elif namespace != '':
handler = _NODETYPE_REGISTRY.get((namespace, cls))
if handler is not None:
return handler
Expand Down

0 comments on commit 96b6595

Please sign in to comment.