@@ -5,25 +5,28 @@ import InteractiveUtils, Markdown, TextWrap
55
66# Rather than generating the file directly, we'll write the output to a buffer
77# 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
1113
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`.
1416
15- ```mermaid
16- ---
17- title: PkgAuthentication state machine diagram
18- ---
17+ ```mermaid
18+ ---
19+ title: PkgAuthentication state machine diagram
20+ ---
1921
20- stateDiagram-v2
22+ stateDiagram-v2
2123
22- [*] --> NeedAuthentication
23- [*] --> NoAuthentication
24- """ )
24+ [*] --> NeedAuthentication
25+ [*] --> NoAuthentication
26+ """ ,
27+ )
2528
26- all_targets = Dict {String,Vector{String}} ()
29+ all_targets = Dict {String, Vector{String}} ()
2730 ignore_errors = (
2831 PkgAuthentication. Failure, PkgAuthentication. Success
2932 )
@@ -34,7 +37,7 @@ buffer = let buffer = IOBuffer(write=true)
3437 end
3538 end
3639 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)
3841 println (buffer)
3942 state_str = string (nameof (state))
4043 # Generate the connecting arrows between the states
@@ -64,8 +67,8 @@ buffer = let buffer = IOBuffer(write=true)
6467 docstr_text = docstr. meta[:results ][1 ]. text[1 ]
6568 println (buffer, " note left of $(state_str) " )
6669 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 ,
6972 )
7073 println (buffer)
7174 println (buffer, " end note" )
@@ -76,13 +79,16 @@ buffer = let buffer = IOBuffer(write=true)
7679 end
7780 end
7881
79- write (buffer, """
80- Success --> [*]
81- Failure --> [*]
82- ```
82+ write (
83+ buffer,
84+ """
85+ Success --> [*]
86+ Failure --> [*]
87+ ```
8388
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+ )
8692
8793 take! (buffer)
8894end
0 commit comments