File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 7
7
yarn.lock
8
8
.git /**
9
9
.pytest_cache /**
10
+ assets /**
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function createLangServer(context: ExtensionContext): LanguageClient {
48
48
49
49
if ( ! token ) {
50
50
const readmePath = Uri . file (
51
- path . join ( context . extensionPath , 'INSTALL .py' )
51
+ path . join ( context . extensionPath , 'welcome-to-sourcery .py' )
52
52
) ;
53
53
window . showTextDocument ( readmePath ) ;
54
54
const result = window . showInputBox ( {
Original file line number Diff line number Diff line change
1
+
2
+
3
+ # Sourcery Installation
4
+
5
+ # 1. Go to https://sourcery.ai/download/?editor=vscode to get a free token.
6
+ # 2. Enter the token into the box above, or search for `sourcery` in the
7
+ # settings and enter the token into the `Sourcery Token` field.
8
+
9
+
10
+ # Welcome to Sourcery! Once you've added the token, look for the
11
+ # underlined `result = []` below. This is a suggestion from Sourcery.
12
+ # Hover over it to see details of the changes including a diff.
13
+
14
+ def refactoring_example (spellbook ):
15
+ result = []
16
+ for spell in spellbook :
17
+ if spell .is_awesome :
18
+ result .append (spell )
19
+ return result
20
+
21
+ # Apply the suggestion by taking the quick-fix action:
22
+ # Put the cursor on the highlighted line and click the lightbulb or use the hotkey
23
+ # (Ctrl + .) or (Cmd + .), then take the 'Convert for loop...' option.
24
+ #
25
+ # All of Sourcery's suggestions are shown in the Problems pane (Ctrl/Cmd+Shift+M).
26
+
27
+ # Sourcery also provides code metrics for each function to give you insight into
28
+ # code quality - hover over the function definition above to see this report.
29
+
30
+ # For more details check out our documentation here:
31
+ # https://github.com/sourcery-ai/sourcery/wiki/Sourcery-Tutorial
32
+
33
+ # Now open up some Python files and look out for the suggestions!
34
+
You can’t perform that action at this time.
0 commit comments