Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump actions/setup-python from 4 to 5 #111

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
32 changes: 19 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: check
on:
workflow_dispatch:
push:
branches: "main"
pull_request:
schedule:
- cron: "0 8 * * *"

concurrency:
group: check-${{ github.ref }}
Expand All @@ -12,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: pre-commit/[email protected]
Expand All @@ -26,23 +30,25 @@ jobs:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
- "pypy-3.7-v7.3.7"
- "pypy-3.10"
- "pypy-3.9"
- "pypy-3.8"

steps:
- uses: actions/checkout@v4
- name: setup python for tox
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: install tox
run: python -m pip install tox
- name: setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Pick environment to run
Expand Down Expand Up @@ -77,9 +83,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install tox
run: python -m pip install tox
- name: Setup coverage tool
Expand Down Expand Up @@ -113,10 +119,10 @@ jobs:
- type
steps:
- uses: actions/checkout@v4
- name: setup Python "3.11"
uses: actions/setup-python@v4
- name: setup Python "3.12"
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: install tox
run: python -m pip install tox
- name: run check for ${{ matrix.tox_env }}
Expand All @@ -128,9 +134,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: setup python to build package
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: install build
run: python -m pip install build
- uses: actions/checkout@v4
Expand Down
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -12,50 +12,50 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [ "--py36-plus" ]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.11.0
hooks:
- id: black
args: [ --safe ]
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [ black==23.3 ]
additional_dependencies: [ black==23.11 ]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.0"
rev: "1.3.1"
hooks:
- id: tox-ini-fmt
args: [ "-p", "fix" ]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.3.23
- flake8-comprehensions==3.12
- flake8-bugbear==23.12.2
- flake8-comprehensions==3.14
- flake8-pytest-style==1.7.2
- flake8-spellcheck==0.28
- flake8-unused-arguments==0.0.13
- flake8-noqa==1.3.1
- flake8-noqa==1.3.2
- pep8-naming==0.13.3
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "0.9.2"
rev: "1.5.3"
hooks:
- id: pyproject-fmt
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
build-backend = 'setuptools.build_meta'
requires = [
"setuptools>=67.6.1",
"setuptools-scm>=7.1",
"setuptools>=69.0.2",
"setuptools-scm>=8.0.4",
]

[tool.setuptools_scm]
Expand Down
15 changes: 8 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ url = https://github.com/bloomberg/attrs-strict
author = Erik-Cristian Seulean
author_email = [email protected]
license = Apache-2.0
license_file = LICENSE
license_files = LICENSE
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
Expand All @@ -30,9 +30,9 @@ project_urls =
[options]
packages = attrs_strict
install_requires =
attrs>=22.2
typing-extensions>=4.5;python_version < "3.8"
python_requires = >=3.7
attrs>=23.1
typing-extensions>=4.8;python_version < "3.8"
python_requires = >=3.8
package_dir =
=src

Expand All @@ -41,11 +41,11 @@ where = src

[options.extras_require]
docs =
Sphinx>=6.1.3
Sphinx>=7.2.6
test =
covdefaults>=2.3
pytest>=7.3.1
pytest-cov>=4
pytest>=7.4.3
pytest-cov>=4.1

[options.package_data]
attrs_strict = py.typed
Expand All @@ -59,6 +59,7 @@ src =
src
.tox/*/lib/python*/site-packages
.tox/pypy*/site-packages
.tox/pypy*/lib/pypy*/site-packages
.tox\*\Lib\site-packages\
*/src
*\src
Expand Down
2 changes: 1 addition & 1 deletion src/attrs_strict/_type_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def _handle_literal(
flattened_literals = _flatten_literals(expected_type)

if not any(
value == literal and type(value) == type(literal)
value == literal and type(value) == type(literal) # noqa: E721
for literal in flattened_literals
):
raise LiteralError(attribute.name, value, flattened_literals)
Expand Down
16 changes: 8 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ requires =
tox>=4.2
env_list =
fix
py312
py311
py310
py39
py38
py37
pypy3
type
coverage
Expand Down Expand Up @@ -38,7 +38,7 @@ description = format the code base to adhere to our styles, and complain about w
base_python = python3.10
skip_install = true
deps =
pre-commit>=3.2.2
pre-commit>=3.5
pass_env =
*
commands =
Expand All @@ -48,7 +48,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.2
mypy==1.7.1
set_env =
{tty:MYPY_FORCE_COLOR = 1}
commands =
Expand All @@ -59,8 +59,8 @@ description = combine coverage files and generate diff (against DIFF_AGAINST def
skip_install = true
deps =
covdefaults>=2.3
coverage>=7.2.3
diff-cover>=7.5
coverage>=7.3.2
diff-cover>=8.0.1
extras =
parallel_show_output = true
pass_env =
Expand All @@ -74,12 +74,12 @@ commands =
coverage html -d {toxworkdir}/htmlcov
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
depends =
py312
py311
py310
py39
py38
py37
pypy3
pypy3.9

[testenv:docs]
description = build documentation
Expand All @@ -93,7 +93,7 @@ commands =
description = check that the long description is valid (need for PyPI)
skip_install = true
deps =
build[virtualenv]>=0.10
build[virtualenv]>=1.0.3
twine>=4.0.2
extras =
commands =
Expand Down