Skip to content

Commit 44ee65b

Browse files
authored
New install file (#32)
1 parent f3d8964 commit 44ee65b

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
yarn.lock
88
.git/**
99
.pytest_cache/**
10+
assets/**

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function createLangServer(context: ExtensionContext): LanguageClient {
4848

4949
if (!token) {
5050
const readmePath = Uri.file(
51-
path.join(context.extensionPath, 'INSTALL.py')
51+
path.join(context.extensionPath, 'welcome-to-sourcery.py')
5252
);
5353
window.showTextDocument(readmePath);
5454
const result = window.showInputBox({

welcome-to-sourcery.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+

0 commit comments

Comments
 (0)