diff options
author | gweis <g.weis@uq.edu.au> | 2022-03-13 10:00:51 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-13 10:00:51 +1000 |
commit | 14aefddd4952a29958f3110bd884bf90b9d5fa9a (patch) | |
tree | e9a13a9b595a4169a1d5a54ff1e49987e68f03a8 | |
parent | d0eb6b98c11a0ed15549b12c39dcc9136727b9e7 (diff) | |
parent | 68a4bbe0a460dc7a8f038fe0f3714851558c379d (diff) | |
download | isodate-14aefddd4952a29958f3110bd884bf90b9d5fa9a.tar.gz |
Merge pull request #66 from isodate/test-gha
Drop support for EOL Python <= 3.6
-rw-r--r-- | .github/workflows/lint.yml | 4 | ||||
-rw-r--r-- | .github/workflows/test.yml | 23 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 16 | ||||
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | setup.py | 3 | ||||
-rw-r--r-- | src/isodate/duration.py | 2 |
7 files changed, 26 insertions, 28 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f8c677..769ea4e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: lint: @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.2 + - uses: pre-commit/action@v2.0.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 098d327..edf58a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,17 @@ name: Test -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] env: FORCE_COLOR: 1 jobs: - build: + test: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "pypy3"] + python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"] os: [ubuntu-latest, macos-latest, windows-latest] include: # Include new variables for Codecov @@ -26,21 +26,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ - hashFiles('**/setup.py') }} - restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}-v1- + cache: pip + cache-dependency-path: "setup.py" - name: Install dependencies run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c00dfd9..1f04e3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,26 @@ repos: + - repo: https://github.com/asottile/pyupgrade + rev: v2.29.1 + hooks: + - id: pyupgrade + args: [--py37-plus] - repo: https://github.com/pycqa/flake8 - rev: 3.9.1 + rev: 4.0.1 hooks: - id: flake8 args: - "--max-line-length=88" + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.9.0 + hooks: + - id: python-check-blanket-noqa + - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.0.1 hooks: - id: check-merge-conflict - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace @@ -9,10 +9,10 @@ ISO 8601 date/time parser :target: https://coveralls.io/r/gweis/isodate?branch=master :alt: Coveralls .. image:: https://img.shields.io/pypi/v/isodate.svg - :target: https://pypi.python.org/pypi/isodate/ + :target: https://pypi.python.org/pypi/isodate/ :alt: Latest Version .. image:: https://img.shields.io/pypi/l/isodate.svg - :target: https://pypi.python.org/pypi/isodate/ + :target: https://pypi.python.org/pypi/isodate/ :alt: License diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2a9acf1..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal = 1 @@ -22,6 +22,7 @@ setup( # keywords = '', url="https://github.com/gweis/isodate/", long_description=(read("README.rst") + read("CHANGES.txt") + read("TODO.txt")), + python_requires=">=3.7", classifiers=[ "Development Status :: 4 - Beta", # 'Environment :: Web Environment', @@ -36,7 +37,7 @@ setup( "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet", - ("Topic :: Software Development :" ": Libraries :: Python Modules"), + "Topic :: Software Development :: Libraries :: Python Modules", ], test_suite="isodate.tests.test_suite", ) diff --git a/src/isodate/duration.py b/src/isodate/duration.py index 3803d1c..f771b54 100644 --- a/src/isodate/duration.py +++ b/src/isodate/duration.py @@ -38,7 +38,7 @@ def max_days_in_month(year, month): return 28 -class Duration(object): +class Duration: """ A class which represents a duration. |