Skip to content

Commit 14aefdd

Browse files
authored
Merge pull request #66 from isodate/test-gha
Drop support for EOL Python <= 3.6
2 parents d0eb6b9 + 68a4bbe commit 14aefdd

File tree

7 files changed

+26
-28
lines changed

7 files changed

+26
-28
lines changed

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Lint
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
lint:
@@ -9,4 +9,4 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-python@v2
12-
- uses: pre-commit/action@v2.0.2
12+
- uses: pre-commit/action@v2.0.3

.github/workflows/test.yml

+5-18
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: Test
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
env:
66
FORCE_COLOR: 1
77

88
jobs:
9-
build:
9+
test:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy3"]
14+
python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"]
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616
include:
1717
# Include new variables for Codecov
@@ -26,21 +26,8 @@ jobs:
2626
uses: actions/setup-python@v2
2727
with:
2828
python-version: ${{ matrix.python-version }}
29-
30-
- name: Get pip cache dir
31-
id: pip-cache
32-
run: |
33-
echo "::set-output name=dir::$(pip cache dir)"
34-
35-
- name: Cache
36-
uses: actions/cache@v2
37-
with:
38-
path: ${{ steps.pip-cache.outputs.dir }}
39-
key:
40-
${{ matrix.os }}-${{ matrix.python-version }}-v1-${{
41-
hashFiles('**/setup.py') }}
42-
restore-keys: |
43-
${{ matrix.os }}-${{ matrix.python-version }}-v1-
29+
cache: pip
30+
cache-dependency-path: "setup.py"
4431

4532
- name: Install dependencies
4633
run: |

.pre-commit-config.yaml

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
repos:
2+
- repo: https://github.com/asottile/pyupgrade
3+
rev: v2.29.1
4+
hooks:
5+
- id: pyupgrade
6+
args: [--py37-plus]
27

38
- repo: https://github.com/pycqa/flake8
4-
rev: 3.9.1
9+
rev: 4.0.1
510
hooks:
611
- id: flake8
712
args:
813
- "--max-line-length=88"
914

15+
- repo: https://github.com/pre-commit/pygrep-hooks
16+
rev: v1.9.0
17+
hooks:
18+
- id: python-check-blanket-noqa
19+
1020
- repo: https://github.com/pre-commit/pre-commit-hooks
11-
rev: v3.4.0
21+
rev: v4.0.1
1222
hooks:
1323
- id: check-merge-conflict
1424
- id: check-yaml
25+
- id: end-of-file-fixer
26+
- id: trailing-whitespace

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ ISO 8601 date/time parser
99
:target: https://coveralls.io/r/gweis/isodate?branch=master
1010
:alt: Coveralls
1111
.. image:: https://img.shields.io/pypi/v/isodate.svg
12-
:target: https://pypi.python.org/pypi/isodate/
12+
:target: https://pypi.python.org/pypi/isodate/
1313
:alt: Latest Version
1414
.. image:: https://img.shields.io/pypi/l/isodate.svg
15-
:target: https://pypi.python.org/pypi/isodate/
15+
:target: https://pypi.python.org/pypi/isodate/
1616
:alt: License
1717

1818

setup.cfg

-2
This file was deleted.

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def read(*rnames):
2222
# keywords = '',
2323
url="https://github.com/gweis/isodate/",
2424
long_description=(read("README.rst") + read("CHANGES.txt") + read("TODO.txt")),
25+
python_requires=">=3.7",
2526
classifiers=[
2627
"Development Status :: 4 - Beta",
2728
# 'Environment :: Web Environment',
@@ -36,7 +37,7 @@ def read(*rnames):
3637
"Programming Language :: Python :: 3.10",
3738
"Programming Language :: Python :: Implementation :: PyPy",
3839
"Topic :: Internet",
39-
("Topic :: Software Development :" ": Libraries :: Python Modules"),
40+
"Topic :: Software Development :: Libraries :: Python Modules",
4041
],
4142
test_suite="isodate.tests.test_suite",
4243
)

src/isodate/duration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def max_days_in_month(year, month):
3838
return 28
3939

4040

41-
class Duration(object):
41+
class Duration:
4242
"""
4343
A class which represents a duration.
4444

0 commit comments

Comments
 (0)