Skip to content

Commit

Permalink
Use relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Jun 20, 2023
1 parent 0227e6a commit fc6566d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bump_pydantic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ def main(
diff: bool = Option(False, help="Show diff instead of applying changes."),
version: bool = Option(None, "--version", callback=version_callback, is_eager=True),
):
cwd = os.getcwd()
files_str = [path.absolute() for path in package.glob("**/*.py")]
files = [str(file.relative_to(cwd)) for file in files_str]
files_str = list(package.glob("**/*.py"))
files = [str(file.relative_to(".")) for file in files_str]

providers = {ScopeProvider, PositionProvider, FullyQualifiedNameProvider}
metadata_manager = FullRepoManager(cwd, files, providers=providers) # type: ignore[arg-type]
metadata_manager = FullRepoManager(".", files, providers=providers) # type: ignore[arg-type]
metadata_manager.resolve_cache()

scratch: Dict[str, Any] = {}
Expand Down

0 comments on commit fc6566d

Please sign in to comment.