@@ -5,25 +5,28 @@ import InteractiveUtils, Markdown, TextWrap
5
5
6
6
# Rather than generating the file directly, we'll write the output to a buffer
7
7
# first, so that we wouldn't end up with a partial file if there is some error.
8
- buffer = let buffer = IOBuffer (write= true )
9
- write (buffer, """
10
- # Internal State Machine
8
+ buffer = let buffer = IOBuffer (; write= true )
9
+ write (
10
+ buffer,
11
+ """
12
+ # Internal State Machine
11
13
12
- The authentication control flow is implemented as the following state machine, starting from the `NeedAuthentication`
13
- state (or `NoAuthentication` if `force=true` is passed to `authenticate`), and finishing in either `Success` or `Failure`.
14
+ The authentication control flow is implemented as the following state machine, starting from the `NeedAuthentication`
15
+ state (or `NoAuthentication` if `force=true` is passed to `authenticate`), and finishing in either `Success` or `Failure`.
14
16
15
- ```mermaid
16
- ---
17
- title: PkgAuthentication state machine diagram
18
- ---
17
+ ```mermaid
18
+ ---
19
+ title: PkgAuthentication state machine diagram
20
+ ---
19
21
20
- stateDiagram-v2
22
+ stateDiagram-v2
21
23
22
- [*] --> NeedAuthentication
23
- [*] --> NoAuthentication
24
- """ )
24
+ [*] --> NeedAuthentication
25
+ [*] --> NoAuthentication
26
+ """ ,
27
+ )
25
28
26
- all_targets = Dict {String,Vector{String}} ()
29
+ all_targets = Dict {String, Vector{String}} ()
27
30
ignore_errors = (
28
31
PkgAuthentication. Failure, PkgAuthentication. Success
29
32
)
@@ -34,7 +37,7 @@ buffer = let buffer = IOBuffer(write=true)
34
37
end
35
38
end
36
39
choice_index = 0
37
- for state in sort (InteractiveUtils. subtypes (PkgAuthentication. State), by= string)
40
+ for state in sort (InteractiveUtils. subtypes (PkgAuthentication. State); by= string)
38
41
println (buffer)
39
42
state_str = string (nameof (state))
40
43
# Generate the connecting arrows between the states
@@ -64,8 +67,8 @@ buffer = let buffer = IOBuffer(write=true)
64
67
docstr_text = docstr. meta[:results ][1 ]. text[1 ]
65
68
println (buffer, " note left of $(state_str) " )
66
69
TextWrap. print_wrapped (
67
- buffer, docstr_text, width= 65 ,
68
- initial_indent = 8 , subsequent_indent = 8 ,
70
+ buffer, docstr_text; width= 65 ,
71
+ initial_indent= 8 , subsequent_indent= 8 ,
69
72
)
70
73
println (buffer)
71
74
println (buffer, " end note" )
@@ -76,13 +79,16 @@ buffer = let buffer = IOBuffer(write=true)
76
79
end
77
80
end
78
81
79
- write (buffer, """
80
- Success --> [*]
81
- Failure --> [*]
82
- ```
82
+ write (
83
+ buffer,
84
+ """
85
+ Success --> [*]
86
+ Failure --> [*]
87
+ ```
83
88
84
- > **Note** This file is automatically generated by the `bin/structure.jl` script.
85
- """ )
89
+ > **Note** This file is automatically generated by the `bin/structure.jl` script.
90
+ """ ,
91
+ )
86
92
87
93
take! (buffer)
88
94
end
0 commit comments