Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
fix lookahead refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
iopapamanoglou committed Aug 29, 2024
1 parent f98968d commit ba5b5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/faebryk/tools/refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def refactor_file(path: Path):
text = re.sub(
rf"^\s*from faebryk.library.{sym} import \(\n\s*{sym},\n\)$", "", text
)
text = re.sub(rf"([^F][^.])\b{sym}\b", f"\1F.{sym}", text)
text = re.sub(rf"(?<!F\.)\b{sym}\b", f"F.{sym}", text)

# print(path, import_symbols)
path.write_text(text)
Expand Down

0 comments on commit ba5b5da

Please sign in to comment.