diff --git a/README.md b/README.md index b4633eb..920687d 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,6 @@ To compare dist files with a reference checkout, run the following: python -m hatch_jupyter_builder.compare_migration sdist ``` -The migration scripts can also be used without installation, using `pipx`, e.g.: - -```bash -pipx hatch_jupyter_builder migrate . -``` - Use `wheel` to compare wheel file contents. See the [documentation for more information on migration](https://hatch-jupyter-builder.readthedocs.io/en/latest/source/how_to_guides/index.html) for more details. diff --git a/hatch_jupyter_builder/migrate/_migrate.py b/hatch_jupyter_builder/migrate/_migrate.py index 0541b65..fbcfedd 100644 --- a/hatch_jupyter_builder/migrate/_migrate.py +++ b/hatch_jupyter_builder/migrate/_migrate.py @@ -79,6 +79,7 @@ # Move flake8 config to separate file, preserving comments. # Add .flake8 file to git. setup_cfg = Path("setup.cfg") +flake8_path = Path(".flake8") flake8 = ["[flake8]"] if setup_cfg.exists(): lines = setup_cfg.read_text("utf-8").splitlines() @@ -97,8 +98,8 @@ flake8.append(line) if matches: - Path(".flake8").write_text("\n".join(flake8) + "\n", "utf-8") - subprocess.run(["git", "add", ".flake"], check=False) + flake8_path.write_text("\n".join(flake8) + "\n", "utf-8") + subprocess.run(["git", "add", str(flake8_path)], check=False) # Migrate and remove unused config.