Skip to content

Commit

Permalink
Fix incompatibility with flake8 6.0 (#21)
Browse files Browse the repository at this point in the history
This PR:

- Adds a non-EDM-based test workflow (which fails with the bug
identified with #22)
- Fixes that bug.

Closes #22

(cherry picked from commit 1fb4847)
  • Loading branch information
mdickinson committed Dec 7, 2022
1 parent 036f421 commit 621e6a3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/run-tests-no-edm.yml
@@ -0,0 +1,26 @@
name: Run test suite (no EDM)

on: [pull_request, workflow_dispatch]

jobs:
test:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
runtime: ['3.8', '3.11']

runs-on: ${{ matrix.os }}

steps:
- name: Clone the source
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install local package
run: python -m pip install .
- name: Run style checks (including our own style checks)
run: python -m flake8 .
- name: Run tests
run: python -m unittest -v
2 changes: 1 addition & 1 deletion flake8_ets/copyright_header.py
Expand Up @@ -188,7 +188,7 @@ def __init__(self, tree, lines):
def add_options(cls, option_manager):
option_manager.add_option(
"--copyright-end-year",
type="int",
type=int,
metavar="year",
default=datetime.datetime.today().year,
parse_from_config=True,
Expand Down

0 comments on commit 621e6a3

Please sign in to comment.