Skip to content

Commit

Permalink
fix typo in dict flatten
Browse files Browse the repository at this point in the history
doh
  • Loading branch information
adonm committed Mar 26, 2024
1 parent 413dbb3 commit 15387d8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 23 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

## Install

[![Python Packaging Index -
Version](https://img.shields.io/pypi/v/nbdev-squ.svg)](https://pypi.org/project/nbdev-squ/)
[![GitHub Actions Workflow
Status](https://img.shields.io/github/actions/workflow/status/wagov/nbdev-squ/deploy.yaml)](https://github.com/wagov/nbdev-squ/actions/workflows/deploy.yaml)
Status](https://img.shields.io/github/actions/workflow/status/wagov/nbdev-squ/deploy.yaml.svg?logo=github)](https://github.com/wagov/nbdev-squ/actions/workflows/deploy.yaml)
[![Python Packaging Index -
Version](https://img.shields.io/pypi/v/nbdev-squ.svg?logo=pypi)](https://pypi.org/project/nbdev-squ/)

Below is how to install in a plain python 3.11+ environment

Expand Down
2 changes: 1 addition & 1 deletion nbdev_squ/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.3"
__version__ = "1.3.4"
2 changes: 1 addition & 1 deletion nbdev_squ/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def flatten(nested_dict, parent_key='', sep='_'):
new_key = f"{parent_key}{sep}{key}" if parent_key else key

if isinstance(value, dict):
flat_dict.update(flatten_dict(value, new_key, sep))
flat_dict.update(flatten(value, new_key, sep))
else:
flat_dict[new_key] = value

Expand Down
2 changes: 1 addition & 1 deletion nbs/02_legacy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
" new_key = f\"{parent_key}{sep}{key}\" if parent_key else key\n",
" \n",
" if isinstance(value, dict):\n",
" flat_dict.update(flatten_dict(value, new_key, sep))\n",
" flat_dict.update(flatten(value, new_key, sep))\n",
" else:\n",
" flat_dict[new_key] = value\n",
" \n",
Expand Down
18 changes: 2 additions & 16 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
"metadata": {},
"source": [
"## Install\n",
"\n",
"[![Python Packaging Index - Version](https://img.shields.io/pypi/v/nbdev-squ.svg)](https://pypi.org/project/nbdev-squ/) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/wagov/nbdev-squ/deploy.yaml)](https://github.com/wagov/nbdev-squ/actions/workflows/deploy.yaml)\n",
"\n",
"[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/wagov/nbdev-squ/deploy.yaml.svg?logo=github)](https://github.com/wagov/nbdev-squ/actions/workflows/deploy.yaml) [![Python Packaging Index - Version](https://img.shields.io/pypi/v/nbdev-squ.svg?logo=pypi)](https://pypi.org/project/nbdev-squ/)\n",
"\n",
"Below is how to install in a plain python 3.11+ environment\n",
"\n",
Expand Down Expand Up @@ -201,21 +199,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "python3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[DEFAULT]
repo = nbdev-squ
lib_name = nbdev-squ
version = 1.3.3
version = 1.3.4
min_python = 3.10
license = apache2
black_formatting = False
Expand Down

0 comments on commit 15387d8

Please sign in to comment.