Skip to content

Commit

Permalink
fix: rust imports (sparckles#733)
Browse files Browse the repository at this point in the history
* fix: rust imports

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
sansyrox and pre-commit-ci[bot] authored Jan 1, 2024
1 parent 04291e9 commit c5c6dfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion robyn/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from InquirerPy import prompt
from InquirerPy.base.control import Choice
from .argument_parser import Config
from .reloader import setup_reloader
from .reloader import create_rust_file, setup_reloader
from robyn.robyn import get_version
from pathlib import Path
import shutil
Expand Down Expand Up @@ -106,6 +106,9 @@ def run():
if config.create:
create_robyn_app()

elif file_name := config.create_rust_file:
create_rust_file(file_name)

elif config.version:
print(get_version())

Expand Down
2 changes: 1 addition & 1 deletion robyn/reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def compile_rust_files(directory_path: str):

def create_rust_file(file_name: str):
if file_name.endswith(".rs"):
file_name = file_name.strip(".rs")
file_name = file_name.removesuffix(".rs")

rust_file = f"{file_name}.rs"

Expand Down

0 comments on commit c5c6dfb

Please sign in to comment.