Skip to content

Commit 700556c

Browse files
authored
Merge pull request #3 from luisrx7/dev
add build and lint action
2 parents f9f85b5 + 5b49dbd commit 700556c

File tree

13 files changed

+934
-75
lines changed

13 files changed

+934
-75
lines changed

.github/workflows/ruff.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Ruff
2+
on: [push, pull_request]
3+
jobs:
4+
ruff:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version: ["3.9", "3.10"]
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: ${{ matrix.python-version }}
14+
- run: pip install ruff
15+
- run: |
16+
ruff check . --ignore E501
17+
18+
19+

.github/workflows/tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: tests
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version: ["3.9", "3.10"]
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install pytest
22+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23+
24+
- name: Test with pytest
25+
run: |
26+
pytest

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# AviatorStratChecker
22

3+
[![Ruff](https://github.com/luisrx7/AviatorStratChecker/actions/workflows/ruff.yml/badge.svg)](https://github.com/luisrx7/AviatorStratChecker/actions/workflows/ruff.yml)
4+
[![build](https://github.com/luisrx7/AviatorStratChecker/actions/workflows/tests.yml/badge.svg)](https://github.com/luisrx7/AviatorStratChecker/actions/workflows/tests.yml)
5+
36
![AviatorStratChecker Cover](https://github.com/luisrx7/AviatorStratChecker/blob/main/assets/aviator-cover.webp)
47

58

aviator/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .aviator import Aviator
1+
from .aviator import Aviator
2+
3+
__all__ = ["Aviator"]

aviator/aviator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_game_results(self):
100100
try:
101101
for element in multiplier_elements:
102102
results.append(element.text.strip().replace("x", ""))
103-
except StaleElementReferenceException | NoSuchElementException:
103+
except StaleElementReferenceException or NoSuchElementException:
104104
#refresh the page
105105
self.driver.refresh()
106106
pass

browser/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
from .browser import Browser
22

3+
__all__ = ["Browser"]

main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import logging
2-
import signal
32

43
import rich
54
import rich.console

0 commit comments

Comments
 (0)