mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
refactor: usage of built-in type hinting in Python solutions
This commit is contained in:
@ -23,7 +23,7 @@ export class GenerateChallengeCommand extends Command {
|
||||
validator: typanion.isString()
|
||||
})
|
||||
|
||||
async execute (): Promise<number> {
|
||||
async execute(): Promise<number> {
|
||||
try {
|
||||
const challenge = await Challenge.generate({
|
||||
name: this.challenge,
|
||||
|
@ -35,7 +35,7 @@ export class GenerateSolutionCommand extends Command {
|
||||
validator: typanion.isString()
|
||||
})
|
||||
|
||||
async execute (): Promise<number> {
|
||||
async execute(): Promise<number> {
|
||||
try {
|
||||
const solution = await Solution.generate({
|
||||
name: this.solutionName,
|
||||
|
@ -46,11 +46,13 @@ export class RunTestCommand extends Command {
|
||||
description: 'Base of the current branch (usually master)'
|
||||
})
|
||||
|
||||
async execute (): Promise<number> {
|
||||
async execute(): Promise<number> {
|
||||
console.log()
|
||||
try {
|
||||
if (this.programmingLanguage != null) {
|
||||
await template.verifySupportedProgrammingLanguage(this.programmingLanguage)
|
||||
await template.verifySupportedProgrammingLanguage(
|
||||
this.programmingLanguage
|
||||
)
|
||||
}
|
||||
if (this.all) {
|
||||
return await Test.runAllTests(this.programmingLanguage)
|
||||
|
Reference in New Issue
Block a user