-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fable-Python] import statement falsely changed to snake_case. #3808
Comments
I've added a fix for this (#3811), but the class will be translated to snake case i.e namespace TestImport
open Fable.Core
type FlowchartDirection =
| TB
| TD
module FlowchartDirection =
let tb = FlowchartDirection.TB
let td = FlowchartDirection.TD |
as long as the import works correctly its fine with me 🙂 |
One more follow up note: this reflection function still contains the camel case name: Not sure for what it is uses, just wanted to mention it @dbrattli |
ah damn one more thing, and this is breaking: Here you can see f# code in which i use a static member of in transpiled python (fable v.4.17.0) EDIT: Using the following workaround i used before your update, still makes it transpile correctly: #if FABLE_COMPILER_PYTHON
[<CompiledName("state_diagram")>]
#endif
[<AttachMembers>]
type stateDiagram = ..transpiles to: |
Have added fixes for this. Please reopen or post new issues if you find new problems |
The minimal reproduction example requires two files:
Setup
Transpiled Files
Transpile with
dotnet fable .\test.fsx --lang py
. I used fable version 4.16.0Problem
In
test_import.py
we can still find "flowchartDirection", but the import statement intest.py
was falsely changed to snake_case.Personally i would favor having the import be the correct name, and keep the name as written. I hope this helps finding the underlying issue.
The text was updated successfully, but these errors were encountered: