Skip to content

Commit

Permalink
Fix incorrect merge of _public_module_end usage
Browse files Browse the repository at this point in the history
  • Loading branch information
emdoyle committed Feb 12, 2024
1 parent 6e6d8b2 commit c17c602
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modguard/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def init_project(root: str, exclude_paths: Optional[list[str]] = None):
try:
if write_op.operation == WriteOperation.BOUNDARY:
add_boundary(write_op.location)
if write_op.operation == WriteOperation.PUBLIC:
elif write_op.operation == WriteOperation.PUBLIC:
mark_as_public(write_op.location, write_op.member_name)
except errors.ModguardError:
print(f"Error marking {write_op.operation} in {write_op.location}")
4 changes: 2 additions & 2 deletions modguard/parsing/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def mark_as_public(file_path: str, member_name: str = ""):
if not member_name:
fs.write_file(
file_path,
_public_module_end(should_import=not modguard_public_is_imported)
+ file_content,
file_content
+ _public_module_end(should_import=not modguard_public_is_imported),
)
return

Expand Down

0 comments on commit c17c602

Please sign in to comment.