linter workflow

This commit is contained in:
2025-04-02 00:34:34 +03:00
parent 6edd17646a
commit 285007a59a
2 changed files with 32 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
name: tests
on:
push:
branches: [ "kolo" ]
pull_request:
branches: [ "kolo" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run linter
run: ruff check ./argenta
+2 -1
View File
@@ -83,7 +83,8 @@ class InputCommand(BaseCommand, Generic[InputCommandType]):
if current_flag_name: if current_flag_name:
if not len(list_of_tokens) == k+1: if not len(list_of_tokens) == k+1:
if not list_of_tokens[k+1].startswith('-'): continue if not list_of_tokens[k+1].startswith('-'):
continue
input_flag = InputFlag(name=current_flag_name[current_flag_name.rfind('-')+1:], input_flag = InputFlag(name=current_flag_name[current_flag_name.rfind('-')+1:],
prefix=cast(Literal['-', '--', '---'], prefix=cast(Literal['-', '--', '---'],