Skip to content

Commit

Permalink
ref - Removed unnecessary imports
Browse files Browse the repository at this point in the history
---

Type: ref
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 8, 2025
1 parent bffe49e commit 7ef86f3
Show file tree
Hide file tree
Showing 53 changed files with 671 additions and 701 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

using Nitrocid.Files;
using Nitrocid.Kernel.Configuration;
using Nitrocid.Kernel.Exceptions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using Nitrocid.Kernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArg(ShellType type)
var CommandInstance =
new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(false, "testarg")
})
])
], null);

// Check for null
Expand Down Expand Up @@ -186,10 +186,10 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitch(ShellT
var CommandInstance =
new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help")
})
])
], null);

// Check for null
Expand Down Expand Up @@ -293,13 +293,13 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitchWithOpt
var CommandInstance =
new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help", new SwitchOptions
{
AcceptsValues = false,
})
})
])
], null);

// Check for null
Expand Down Expand Up @@ -445,10 +445,10 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArg(string type)
var CommandInstance =
new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(false, "testarg")
})
])
], null);

// Check for null
Expand Down Expand Up @@ -487,10 +487,10 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitch(string
var CommandInstance =
new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help")
})
])
], null);

// Check for null
Expand Down Expand Up @@ -594,13 +594,13 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitchWithOpt
var CommandInstance =
new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help", new SwitchOptions
{
AcceptsValues = false,
})
})
])
], null);

// Check for null
Expand Down Expand Up @@ -751,15 +751,15 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgMultiCommandArgum
// Create instance
var CommandInstance = new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(false, "testarg")
}),
new CommandArgumentInfo(new[]
{
]),
new CommandArgumentInfo(
[
new CommandArgumentPart(true, "testme"),
new CommandArgumentPart(false, "path"),
}),
]),
], null);

// Check for null
Expand Down Expand Up @@ -803,14 +803,14 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitchMultiCo
// Create instance
var CommandInstance = new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help")
}),
new CommandArgumentInfo(new[]
{
]),
new CommandArgumentInfo(
[
new SwitchInfo("c", "Complicated help")
}),
]),
], null);

// Check for null
Expand Down Expand Up @@ -948,21 +948,21 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitchWithOpt
// Create instance
var CommandInstance = new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help", new SwitchOptions
{
AcceptsValues = false,
})
}),
new CommandArgumentInfo(new[]
{
]),
new CommandArgumentInfo(
[
new SwitchInfo("c", "Complicated help", new SwitchOptions
{
AcceptsValues = false,
IsRequired = true,
})
}),
]),
], null);

// Check for null
Expand Down Expand Up @@ -1152,15 +1152,15 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgMultiCommandArgum
// Create instance
var CommandInstance = new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(false, "testarg")
}),
new CommandArgumentInfo(new[]
{
]),
new CommandArgumentInfo(
[
new CommandArgumentPart(true, "testme"),
new CommandArgumentPart(false, "path"),
}),
]),
], null);

// Check for null
Expand Down Expand Up @@ -1204,14 +1204,14 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitchMultiCo
// Create instance
var CommandInstance = new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help")
}),
new CommandArgumentInfo(new[]
{
]),
new CommandArgumentInfo(
[
new SwitchInfo("c", "Complicated help")
}),
]),
], null);

// Check for null
Expand Down Expand Up @@ -1349,21 +1349,21 @@ public void TestInitializeCommandInfoInstanceFromCommandLineArgWithSwitchWithOpt
// Create instance
var CommandInstance = new CommandInfo("help", $"Help page for type {type}",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new SwitchInfo("s", "Simple help", new SwitchOptions
{
AcceptsValues = false,
})
}),
new CommandArgumentInfo(new[]
{
]),
new CommandArgumentInfo(
[
new SwitchInfo("c", "Complicated help", new SwitchOptions
{
AcceptsValues = false,
IsRequired = true,
})
}),
]),
], null);

// Check for null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal class AmusementsInit : IAddon

new CommandInfo("hangman", /* Localizable */ "Starts the Hangman game",
[
new CommandArgumentInfo(new[] {
new CommandArgumentInfo([
new SwitchInfo("hardcore", /* Localizable */ "One wrong letter and you're hung!", new SwitchOptions()
{
ConflictsWith = ["practice"],
Expand All @@ -65,7 +65,7 @@ internal class AmusementsInit : IAddon
ConflictsWith = ["common"],
AcceptsValues = false
}),
})
])
], new HangmanCommand()),

new CommandInfo("meteor", /* Localizable */ "You are a spaceship and the meteors are coming to destroy you. Can you save it?", new MeteorCommand()),
Expand All @@ -86,7 +86,7 @@ internal class AmusementsInit : IAddon

new CommandInfo("speedpress", /* Localizable */ "See if you can press a key on time",
[
new CommandArgumentInfo(new[] {
new CommandArgumentInfo([
new SwitchInfo("e", /* Localizable */ "Starts the game in easy difficulty", new SwitchOptions()
{
ConflictsWith = ["m", "h", "v", "c"],
Expand All @@ -112,12 +112,12 @@ internal class AmusementsInit : IAddon
ConflictsWith = ["m", "h", "v", "e"],
ArgumentsRequired = true
})
})
])
], new SpeedPressCommand()),

new CommandInfo("wordle", /* Localizable */ "The Wordle game simulator",
[
new CommandArgumentInfo(new[] {
new CommandArgumentInfo([
new SwitchInfo("orig", /* Localizable */ "Play the Wordle game originally", new SwitchOptions()
{
AcceptsValues = false
Expand All @@ -132,7 +132,7 @@ internal class AmusementsInit : IAddon
ConflictsWith = ["common"],
AcceptsValues = false
}),
})
])
], new WordleCommand()),

new CommandInfo("2018", /* Localizable */ "Commemorates the 5-year anniversary of the kernel release", new AnniversaryCommand()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ internal class ArchiveShellInfo : BaseShellInfo<ArchiveShell>, IShellInfo

new CommandInfo("chdir", /* Localizable */ "Changes directory",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(true, "directory")
})
])
], new ChDirCommand()),

new CommandInfo("chadir", /* Localizable */ "Changes archive directory",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(true, "archivedirectory")
})
])
], new ChADirCommand()),

new CommandInfo("get", /* Localizable */ "Extracts a file to a specified directory or a current directory",
Expand All @@ -70,19 +70,19 @@ internal class ArchiveShellInfo : BaseShellInfo<ArchiveShell>, IShellInfo

new CommandInfo("list", /* Localizable */ "Lists all files inside the archive",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(false, "directory")
})
])
], new ListCommand(), CommandFlags.Wrappable | CommandFlags.RedirectionSupported),

new CommandInfo("pack", /* Localizable */ "Packs a local file to the archive",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(true, "localfile"),
new CommandArgumentPart(false, "where")
})
])
], new PackCommand()),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ internal class ArchiveShellInit : IAddon
[
new CommandInfo("archive", /* Localizable */ "Opens the archive file to the archive shell",
[
new CommandArgumentInfo(new[]
{
new CommandArgumentInfo(
[
new CommandArgumentPart(true, "archivefile"),
})
])
], new ArchiveCommand())
];

Expand Down
Loading

0 comments on commit 7ef86f3

Please sign in to comment.