diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index afa3be2..63151f7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,17 +15,21 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false + matrix: + python-version: + - "3.10" + - "3.11" steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.10-dev - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2.3.1 with: - python-version: "3.10-dev" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python3.10 -m pip install --upgrade pip - python3.10 -m pip install --upgrade pytest pytest-cov + pip install --upgrade pip + pip install --upgrade pytest pytest-cov if [ -f requirements.txt ]; then pip install -r requirements.txt; fi # - name: Lint with flake8 # run: | @@ -35,7 +39,7 @@ jobs: # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - python3.10 -m pytest --cov=calculator tests/ + pytest --cov=calculator tests/ - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/calculator/parser_.py b/calculator/parser_.py index 737f219..8174e7d 100644 --- a/calculator/parser_.py +++ b/calculator/parser_.py @@ -7,7 +7,7 @@ class Parser: self.tokens = iter(tokens) self.advance() - def raise_error(self, e = None): + def raise_error(self, e=None): if e: raise Exception(f"Error: {e}") raise Exception("Invalid syntax")