Skip to content

Commit

Permalink
simplify installation
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Jan 9, 2024
1 parent 8937859 commit a54e772
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
- name: Install the package and its dependencies
run: |
python -m pip install --upgrade pip
pip install ".[test]"
pip install .
- name: Lint
run: |
pip install flake8
flake8 .
- name: Test
run: |
pip install pytest
cd && mkdir for_test && cd for_test && pytest -svv --pyargs gapps --durations=0
4 changes: 3 additions & 1 deletion gapps/cardservice/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ def floats2hex(rgb):
"""Takes an RGB tuple or list and returns a hex RGB string."""
if not rgb or not isinstance(rgb, (tuple, list)):
return None
return f'#{int(rgb[0]*255):02x}{int(rgb[1]*255):02x}{int(rgb[2]*255):02x}'
str_hex = f'#{int(rgb[0] * 255):02x}{int(rgb[1] * 255):02x}'
str_hex += f'{int(rgb[2] * 255):02x}'
return str_hex


def get_form_value(form, key):
Expand Down

0 comments on commit a54e772

Please sign in to comment.