Skip to content

Commit

Permalink
Fixes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyid5416 authored Jan 28, 2024
1 parent 8085bb0 commit 3c627d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
from typing import Literal


def env(name:str, _def=''):
def env(name: str, _def=''):
""" Returns environment variable """
return os.environ.get(
name,
_def
)


# BUG: Previous step annotations are being overwritten
# -BUG: Previous step annotations are being overwritten
def set_annotation(
message:str,
title:str='',
_type:Literal['debug', 'notice', 'warning', 'error']='notice',
message: str,
title: str='',
_type: Literal['debug', 'notice', 'warning', 'error']='notice',
):
"""
Sets annotation with `message` text
Expand All @@ -27,7 +27,7 @@ def set_annotation(
exit(1)


def set_output(key:str, value:str):
def set_output(key: str, value: str):
""" Sets the output to `$GITHUB_OUTPUT` file
- Using `key=value`
"""
Expand Down
7 changes: 4 additions & 3 deletions src/mods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from actions import *
from typing import List



Expand Down Expand Up @@ -57,8 +58,8 @@
]

# Distinguish provided options -> into supported & unsupported options
supported_options :list[str] = []
unsupported_options :list[str] = []
supported_options: List[str] = []
unsupported_options: List[str] = []
for option in providedOptions:
option_key = option.split()[0]
if bool(option_key in pyOptions_keys and specExt == '.py') or \
Expand Down Expand Up @@ -93,7 +94,7 @@
)


def get_option_value(option:str):
def get_option_value(option: str):
""" Returns: Value of `option` from provided options """
for i in supported_options:
iList = i.split(maxsplit=1)
Expand Down

0 comments on commit 3c627d0

Please sign in to comment.