Skip to content

Commit 63378e1

Browse files
committed
Code quality
1 parent 1ddfabc commit 63378e1

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Flow.Launcher.Core/Plugin/PluginsLoader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static List<PluginPair> Plugins(List<PluginMetadata> metadatas, PluginsSe
5050
return plugins;
5151
}
5252

53-
public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
53+
private static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
5454
{
5555
var erroredPlugins = new List<string>();
5656

@@ -132,7 +132,7 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
132132
return plugins;
133133
}
134134

135-
public static IEnumerable<PluginPair> ExecutablePlugins(IEnumerable<PluginMetadata> source)
135+
private static IEnumerable<PluginPair> ExecutablePlugins(IEnumerable<PluginMetadata> source)
136136
{
137137
return source
138138
.Where(o => o.Language.Equals(AllowedLanguage.Executable, StringComparison.OrdinalIgnoreCase))
@@ -146,7 +146,7 @@ public static IEnumerable<PluginPair> ExecutablePlugins(IEnumerable<PluginMetada
146146
});
147147
}
148148

149-
public static IEnumerable<PluginPair> ExecutableV2Plugins(IEnumerable<PluginMetadata> source)
149+
private static IEnumerable<PluginPair> ExecutableV2Plugins(IEnumerable<PluginMetadata> source)
150150
{
151151
return source
152152
.Where(o => o.Language.Equals(AllowedLanguage.ExecutableV2, StringComparison.OrdinalIgnoreCase))

Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ namespace Flow.Launcher.Infrastructure.UserSettings
66
public class PluginsSettings : BaseModel
77
{
88
private string pythonExecutablePath = string.Empty;
9-
public string PythonExecutablePath {
10-
get { return pythonExecutablePath; }
9+
public string PythonExecutablePath
10+
{
11+
get => pythonExecutablePath;
1112
set
1213
{
1314
pythonExecutablePath = value;
@@ -18,7 +19,7 @@ public string PythonExecutablePath {
1819
private string nodeExecutablePath = string.Empty;
1920
public string NodeExecutablePath
2021
{
21-
get { return nodeExecutablePath; }
22+
get => nodeExecutablePath;
2223
set
2324
{
2425
nodeExecutablePath = value;
@@ -67,10 +68,13 @@ public void UpdatePluginSettings(List<PluginMetadata> metadatas)
6768
}
6869
}
6970
}
71+
7072
public class Plugin
7173
{
7274
public string ID { get; set; }
75+
7376
public string Name { get; set; }
77+
7478
public string Version { get; set; }
7579
public List<string> ActionKeywords { get; set; } // a reference of the action keywords from plugin manager
7680
public int Priority { get; set; }

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public Control SettingControl
131131
PluginPair.Metadata.AvgQueryTime + "ms";
132132
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
133133
public int Priority => PluginPair.Metadata.Priority;
134-
public Infrastructure.UserSettings.Plugin PluginSettingsObject { get; set; }
134+
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
135135

136136
public void OnActionKeywordsChanged()
137137
{

0 commit comments

Comments
 (0)