﻿# sync


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The library is primarily developed in notebooks so any big changes
should be made there. But sometimes, it’s easier to fix small bugs or
typos in the modules directly. `nbdev-update` is the command that will
propagate those changes back to the corresponding notebooks.

Note that you can’t create new cells or reorder cells with that
functionality, so your corrections should remain limited. Exported `.py`
files must contain cell IDs (format `# %% path/nb.ipynb #cell_id`); if
your exports don’t have IDs, run `nbdev-export` to regenerate them.

------------------------------------------------------------------------

<a
href="https://github.com/AnswerDotAI/nbdev/blob/main/nbdev/sync.py#L26"
target="_blank" style="float:right; font-size:smaller">source</a>

### absolute_import

``` python
def absolute_import(
    name, fname, level
):
```

*Unwarps a relative import in `name` according to `fname`*

``` python
test_eq(absolute_import('xyz', 'nbdev', 0), 'xyz')
test_eq(absolute_import('', 'nbdev', 1), 'nbdev')
test_eq(absolute_import(None, 'nbdev', 1), 'nbdev')
test_eq(absolute_import('core', 'nbdev', 1), 'nbdev.core')
test_eq(absolute_import('core', 'nbdev/vision', 2), 'nbdev.core')  # from ..core import *
test_eq(absolute_import('transform', 'nbdev/vision', 1), 'nbdev.vision.transform')  # from .transform import *
test_eq(absolute_import('notebook.core', 'nbdev/data', 2), 'nbdev.notebook.core')  # from ..notebook.core import *
```

------------------------------------------------------------------------

<a
href="https://github.com/AnswerDotAI/nbdev/blob/main/nbdev/sync.py#L75"
target="_blank" style="float:right; font-size:smaller">source</a>

### nbdev_update

``` python
def nbdev_update(
    fname:str=None, # A Python file name to update
):
```

*Propagate change in modules matching `fname` to notebooks that created
them*
