Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Dec 18, 2022
1 parent e75af15 commit f148326
Show file tree
Hide file tree
Showing 33 changed files with 12,829 additions and 204 deletions.
37 changes: 2 additions & 35 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Tests

on: [push, pull_request]

# TODO: enable mypy again
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', 3.11-dev, pypy2, pypy-3.6]
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', pypy2, pypy-3.6]

steps:
- uses: actions/checkout@v2
Expand All @@ -21,21 +22,6 @@ jobs:
pip install -U pip
pip install --upgrade coveralls setuptools setuptools_scm pep517 .[tests]
pip install .
- name: Mypy testing (<3.11)
run: |
pip install mypy==0.910
python -m mypy executing --exclude=executing/_position_node_finder.py
# fromJson because https://github.community/t/passing-an-array-literal-to-contains-function-causes-syntax-error/17213/3
if: ${{ !contains(fromJson('["2.7", "pypy2", "pypy-3.6", "3.11-dev"]'), matrix.python-version) }}
# pypy < 3.8 very doesn't work
# 2.7 is tested separately in mypy-py2, as we need to run mypy under Python 3.x
- name: Mypy testing (3.11)
run: |
pip install mypy==0.971
python -m mypy executing
# fromJson because https://github.community/t/passing-an-array-literal-to-contains-function-causes-syntax-error/17213/3
if: ${{ contains(fromJson('["3.11-dev"]'), matrix.python-version) }}
# only >=3.11 use _position_node_finder.py
- name: Test
env:
EXECUTING_SLOW_TESTS: 1
Expand All @@ -57,22 +43,3 @@ jobs:
with:
parallel-finished: true

# Can't run mypy on Python 2.7, but can run it in Python 2 mode
mypy-py2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
pip install --upgrade setuptools setuptools_scm pep517
pip install .[tests]
pip install mypy[python2]==0.910
- name: Mypy testing for Python 2
run: |
python -m mypy --py2 executing --exclude=executing/_position_node_finder.py
5 changes: 5 additions & 0 deletions executing/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ def __init__(self, title, node, instruction):
self.instruction = instruction

super().__init__(title) # type: ignore[call-arg]


class MultipleMatches(Exception):
def __init__(self,nodes):
self.nodes=nodes
Loading

0 comments on commit f148326

Please sign in to comment.