Skip to content

refac file src dst does not fix relative imports in the moved file #10

@vivster7

Description

@vivster7

Describe the bug
Moving a file with relative imports will not correctly rewrite the imports in that moved file.

To Reproduce

  1. setup
# a.py
from . import z
  1. movepy file a.py b/c.py

Expected behavior
Expected

# b/c.py
from .. import z

Actual

# b/c.py
from . import z

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions