Skip to content

Commit

Permalink
Update deps + formatting (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli authored May 3, 2023
1 parent 8eaf214 commit 982e21c
Show file tree
Hide file tree
Showing 17 changed files with 142 additions and 127 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"isRoot": true,
"tools": {
"paket": {
"version": "7.2.0",
"version": "7.2.1",
"commands": [
"paket"
]
},
"fable": {
"version": "4.0.0-theta-018",
"version": "4.1.3",
"commands": [
"fable"
]
},
"fantomas": {
"version": "5.1.5",
"version": "6.0.1",
"commands": [
"fantomas"
]
Expand Down
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.fs]
max_line_length=120
insert_final_newline=true
4 changes: 2 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ storage: none
framework: net6.0, netstandard2.0, netstandard2.1

nuget FSharp.Core >= 4.7.2 lowest_matching: true
nuget Fable.Core ~> 4.0.0 prerelease
nuget Fable.Core ~> 4.1

group Test
source https://api.nuget.org/v3/index.json
storage: none
framework: net6.0

nuget FSharp.Core
nuget Fable.Core ~> 4.0.0 prerelease
nuget Fable.Core ~> 4.1
nuget Microsoft.NET.Test.Sdk ~> 16
nuget XUnit ~> 2
nuget xunit.runner.visualstudio ~> 2
Expand Down
10 changes: 5 additions & 5 deletions src/cognite-sdk/CogniteSdk.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module Fable.Python.CogniteSdk
open Fable.Core

type ITimeSeries =
abstract plot : start: string * ``end``: string * aggregates: string array * granularity: string -> unit
abstract plot: start: string * ``end``: string * aggregates: string array * granularity: string -> unit

type ITimeSeriesApi =
abstract retrieve : id: int64 -> ITimeSeries
abstract list : unit -> ITimeSeries list
abstract retrieve: id: int64 -> ITimeSeries
abstract list: unit -> ITimeSeries list

[<Import("CogniteClient", from = "cognite.client")>]
type CogniteClient (?apiKey: string, ?api_subversion: string, ?project: string, ?clientName: string) =
abstract member time_series : ITimeSeriesApi
type CogniteClient(?apiKey: string, ?api_subversion: string, ?project: string, ?clientName: string) =
abstract member time_series: ITimeSeriesApi
override this.time_series = nativeOnly
18 changes: 9 additions & 9 deletions src/flask/Flask.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ open Fable.Core

// fsharplint:disable MemberNames
type RequestBase =
abstract url : string
abstract url: string

type Request =
inherit RequestBase

type Flask =
abstract route : rule: string -> ((unit -> string) -> Flask)
abstract route : rule: string * methods: string array -> ((unit -> string) -> Flask)
abstract route: rule: string -> ((unit -> string) -> Flask)
abstract route: rule: string * methods: string array -> ((unit -> string) -> Flask)

type FlaskStatic =
[<Emit("$0($1, static_url_path=$2)")>]
abstract Create : name: string * static_url_path: string -> Flask
abstract Create: name: string * static_url_path: string -> Flask

[<Import("Flask", "flask")>]
let Flask : FlaskStatic = nativeOnly
let Flask: FlaskStatic = nativeOnly

type IExports =
abstract render_template : template_name_or_list: string -> string
abstract render_template : template_name_or_list: string seq -> string
abstract request : Request
abstract render_template: template_name_or_list: string -> string
abstract render_template: template_name_or_list: string seq -> string
abstract request: Request

[<Emit("flask.url_for($0, filename=$1)")>]
abstract url_for : route : string * filename: string -> string
abstract url_for: route: string * filename: string -> string

[<ImportAll("flask")>]
let flask: IExports = nativeOnly
33 changes: 17 additions & 16 deletions src/jupyter/IPyWidgets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,36 @@ open Fable.Core


type IWidget =
abstract close : unit -> unit
abstract close: unit -> unit

type IIntSlider =
inherit IWidget

abstract value : int
abstract min : int
abstract max : int
abstract value: int
abstract min: int
abstract max: int

type IFloatSlider =
inherit IWidget

abstract value : float
abstract min : float
abstract max : float
abstract value: float
abstract min: float
abstract max: float

type IExports =
[<Emit("$0.interact($1, x=$2)")>]
abstract interact<'T1, 'T2> : fn : ('T1 -> 'T2) * x: 'T1 -> 'T2
abstract interact<'T1, 'T2> : fn: ('T1 -> 'T2) * x: 'T1 -> 'T2

[<Emit("$0.interact($1, x=$2, y=$3)")>]
abstract interact<'T1, 'T2, 'T3> : fn : ('T1*'T2 -> 'T3) * x: 'T1 * y: 'T2 -> 'T3
abstract interact<'T1, 'T2, 'T3> : fn: ('T1 * 'T2 -> 'T3) * x: 'T1 * y: 'T2 -> 'T3

abstract IntSlider : unit -> IIntSlider
abstract IntSlider : value: int -> IIntSlider
abstract IntSlider : value: int * min: int * max: int * step: int * description: string -> IIntSlider
abstract IntSlider: unit -> IIntSlider
abstract IntSlider: value: int -> IIntSlider
abstract IntSlider: value: int * min: int * max: int * step: int * description: string -> IIntSlider

abstract FloatSlider : unit -> IFloatSlider
abstract FloatSlider : value: float -> IFloatSlider
abstract FloatSlider : value: float * min: int * max: int * step: int * description: string -> IFloatSlider
abstract FloatSlider: unit -> IFloatSlider
abstract FloatSlider: value: float -> IFloatSlider
abstract FloatSlider: value: float * min: int * max: int * step: int * description: string -> IFloatSlider

[<ImportAll("ipywidgets")>]
let widgets : IExports = nativeOnly
let widgets: IExports = nativeOnly
13 changes: 7 additions & 6 deletions src/jupyter/IPython.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module Fable.Python.IPython
open Fable.Core

type IDisplay =
abstract display : value: obj -> unit
abstract Code : data: string -> unit
abstract display: value: obj -> unit
abstract Code: data: string -> unit

[<Emit("display.Code($1, language=$2)")>]
abstract Code : data: string * language: string -> unit
abstract Code: data: string * language: string -> unit

[<Emit("display.Markdown($1)")>]
abstract Markdown : data: string -> unit
abstract Markdown: data: string -> unit

[<Import("display", "IPython")>]
let display : IDisplay = nativeOnly

let display: IDisplay = nativeOnly
64 changes: 32 additions & 32 deletions src/stdlib/Base64.fs
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module Fable.Python.Base64

open Fable.Core

// fsharplint:disable MemberNames

[<Erase>]
type IExports =
abstract b64encode : byte[] -> byte[]
abstract b64encode : s : byte[] * altchars: byte[] -> byte[]

abstract b64decode : byte[] -> byte[]
abstract b64decode : string -> byte[]
abstract b64decode : s: byte[] * altchars : byte[] -> byte[]
abstract b64decode : s: string * altchars : byte[] -> byte[]
abstract b64decode : s: byte[] * altchars : byte[] * validate: bool -> byte[]
abstract b64decode : s: string * altchars : byte[] * validate: bool -> byte[]
abstract b64decode : s: byte[] * validate: bool -> byte[]
abstract b64decode : s: string * validate: bool -> byte[]

abstract standard_b64encode : byte[] -> byte[]
abstract standard_b64decode : string -> byte[]
abstract standard_b64decode : byte[] -> byte[]
abstract urlsafe_b64encode : byte[] -> byte[]
abstract urlsafe_b64decode : string -> byte[]
abstract urlsafe_b64decode : byte[] -> byte[]
abstract b32encode : byte[] -> byte[]
abstract b16encode : byte[] -> byte

/// Base16, Base32, Base64, Base85 Data Encodings
[<ImportAll("base64")>]
let base64: IExports = nativeOnly
module Fable.Python.Base64

open Fable.Core

// fsharplint:disable MemberNames

[<Erase>]
type IExports =
abstract b64encode: byte[] -> byte[]
abstract b64encode: s: byte[] * altchars: byte[] -> byte[]

abstract b64decode: byte[] -> byte[]
abstract b64decode: string -> byte[]
abstract b64decode: s: byte[] * altchars: byte[] -> byte[]
abstract b64decode: s: string * altchars: byte[] -> byte[]
abstract b64decode: s: byte[] * altchars: byte[] * validate: bool -> byte[]
abstract b64decode: s: string * altchars: byte[] * validate: bool -> byte[]
abstract b64decode: s: byte[] * validate: bool -> byte[]
abstract b64decode: s: string * validate: bool -> byte[]

abstract standard_b64encode: byte[] -> byte[]
abstract standard_b64decode: string -> byte[]
abstract standard_b64decode: byte[] -> byte[]
abstract urlsafe_b64encode: byte[] -> byte[]
abstract urlsafe_b64decode: string -> byte[]
abstract urlsafe_b64decode: byte[] -> byte[]
abstract b32encode: byte[] -> byte[]
abstract b16encode: byte[] -> byte

/// Base16, Base32, Base64, Base85 Data Encodings
[<ImportAll("base64")>]
let base64: IExports = nativeOnly
4 changes: 2 additions & 2 deletions src/stdlib/Math.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ type IExports =
abstract floor: float -> int
abstract fmod: int -> int -> int

abstract gcd: [<ParamArray>] ints: int [] -> int
abstract gcd: [<ParamArray>] ints: int[] -> int
abstract isfinite: float -> bool
abstract isfinite: int -> bool
abstract isinf: float -> bool
abstract isinf: int -> bool
abstract isnan: float -> bool
abstract isnan: int -> bool
abstract lcm: [<ParamArray>] ints: int [] -> int
abstract lcm: [<ParamArray>] ints: int[] -> int

abstract exp: float -> float
abstract expm1: float -> float
Expand Down
18 changes: 9 additions & 9 deletions src/stdlib/Os.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ open Fable.Core

[<Erase>]
type IExports =
abstract chdir : string -> unit
abstract chroot : string -> unit
abstract close : fd: int -> unit
abstract environ : Dictionary<string, string>
abstract getcwd : unit -> string
abstract getenv : key: string -> string option
abstract getenv : key: string * ``default``: string -> string
abstract kill : pid: int * ``sig``: int -> unit
abstract putenv : key: string * value: string -> unit
abstract chdir: string -> unit
abstract chroot: string -> unit
abstract close: fd: int -> unit
abstract environ: Dictionary<string, string>
abstract getcwd: unit -> string
abstract getenv: key: string -> string option
abstract getenv: key: string * ``default``: string -> string
abstract kill: pid: int * ``sig``: int -> unit
abstract putenv: key: string * value: string -> unit


/// Miscellaneous operating system interfaces
Expand Down
12 changes: 6 additions & 6 deletions src/stdlib/Queue.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Fable.Core
// fsharplint:disable MemberNames

[<Import("Queue", "queue")>]
type Queue<'T> () =
type Queue<'T>() =
/// Return the approximate size of the queue. Note, qsize() > 0 doesn’t guarantee that a subsequent get() will not
/// block, nor will qsize() < maxsize guarantee that put() will not block.
member x.qsize() : int = nativeOnly
Expand Down Expand Up @@ -43,15 +43,15 @@ type Queue<'T> () =
member x.task_done() : unit = nativeOnly

[<Import("PriorityQueue", "queue")>]
type PriorityQueue<'T> () =
inherit Queue<'T> ()
type PriorityQueue<'T>() =
inherit Queue<'T>()

[<Import("LifoQueue", "queue")>]
type LifoQueue<'T> () =
inherit Queue<'T> ()
type LifoQueue<'T>() =
inherit Queue<'T>()

[<Import("SimpleQueue", "queue")>]
type SimpleQueue<'T> () =
type SimpleQueue<'T>() =
/// Return the approximate size of the queue. Note, qsize() > 0 doesn’t guarantee that a subsequent get() will not
/// block, nor will qsize() < maxsize guarantee that put() will not block.
member x.qsize() : int = nativeOnly
Expand Down
3 changes: 2 additions & 1 deletion src/stdlib/String.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ open Fable.Core
// fsharplint:disable MemberNames

type System.String with

[<Emit("$0.format($1...)")>]
member _.format([<ParamArray>] args: Object []) = nativeOnly
member _.format([<ParamArray>] args: Object[]) = nativeOnly
22 changes: 11 additions & 11 deletions src/stdlib/Time.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ open Fable.Core

[<Erase>]
type IExports =
abstract altzone : int
abstract ctime : unit -> string
abstract ctime : float -> string
abstract daylight : int
abstract monotonic : unit -> float
abstract perf_counter : unit -> float
abstract process_time : unit -> float
abstract sleep : secs: float -> unit
abstract time : unit -> float
abstract timezone : int
abstract tzname : string * string
abstract altzone: int
abstract ctime: unit -> string
abstract ctime: float -> string
abstract daylight: int
abstract monotonic: unit -> float
abstract perf_counter: unit -> float
abstract process_time: unit -> float
abstract sleep: secs: float -> unit
abstract time: unit -> float
abstract timezone: int
abstract tzname: string * string

/// Time access and conversions
[<ImportAll("time")>]
Expand Down
Loading

0 comments on commit 982e21c

Please sign in to comment.