diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b525c01 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [2.7, 3.5, 3.6, 3.7, pypy2, pypy3] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Tox and any other packages + run: pip install tox + - name: Lint + if: matrix.python-version == '2.7' || matrix.python-version == '3.7' + run: | + pip install flake8 + flake8 git_stacktrace + - name: Run Tests via Tox + # Run tox using the version of Python in `PATH` + run: tox -e py diff --git a/git_stacktrace/parse_trace.py b/git_stacktrace/parse_trace.py index 85634ac..0068d70 100644 --- a/git_stacktrace/parse_trace.py +++ b/git_stacktrace/parse_trace.py @@ -129,7 +129,7 @@ def extract_traceback(self, lines): self.lines = extracted # Sanity check new_lines = traceback.format_list(self.traceback_format()) - new_lines = ('\n'.join([l.rstrip() for l in new_lines])) + new_lines = ('\n'.join([line.rstrip() for line in new_lines])) lines = ('\n'.join(lines)) if lines != new_lines or not self.lines: message = "Incorrectly extracted traceback information"