Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
Raub Camaioni committed Aug 1, 2023
1 parent f9ad1e5 commit aa31f13
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ There are a few assumptions that need to be made when converting from cython to
-How to handle syntax that does not exist in python?
 -structs are translated to classes

# Why generate Stub Files?
# Why generate stub files?
Most langauge servers don't understand cython code.

By including STUB files with your cython compiled module you maintain:
-module, function, class, method auto completion
-argument names/number and type hinting
-doc strings

# Colab Notebook to try the Parsing Code
# Colab notebook to test code
https://colab.research.google.com/drive/1KvSUznOoeJ_F8GxzA9IafbMXA6mTR_Nj?usp=sharing

# Customize Your Type Conversions
Customizable convertion between cython and python types.
# Customize you type conversions
Customizable conversions between cython and python types.
Use the setter function provided to change the type conversion function.
An example is given inside "usage/examples.ipynb"

Expand All @@ -34,7 +34,7 @@ Add the stub generation script into your cython setup.py file.
from pathlib import Path
import cython_peg as cp

# set indent used
# set indent used in stub file
cp.set_indent(" ")

for file in Path(r"module_directory").glob("*.pyx"):
Expand Down

0 comments on commit aa31f13

Please sign in to comment.