Skip to content

Commit

Permalink
Version 0.5.0 (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Mar 29, 2024
1 parent 414ef39 commit c85559b
Show file tree
Hide file tree
Showing 7 changed files with 983 additions and 988 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ updates:
directory: "/"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "02:00"
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -15,20 +18,20 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
curl -sSL \
"https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py" | python
curl -sSL "https://install.python-poetry.org" | python
# Adding `poetry` to `$PATH`:
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
Expand All @@ -46,9 +49,8 @@ jobs:
poetry run pytest
poetry check
poetry run pip check
poetry run safety check --full-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
We follow Semantic Versions since the `0.1.0` release.


## Version 0.5.0

### Features

- Adds `python3.11` and `python3.12` support
- Drops `python3.7` and `python3.8` support

### Bugfixes

- Fixes the return annotation from `NoReturn` to `None`


## Version 0.4.0

### Features
Expand Down
1,884 changes: 938 additions & 946 deletions poetry.lock

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "safe-assert"
version = "0.4.0"
version = "0.5.0"
description = "Safe assert for Python that can be used together with optimised mode"
license = "MIT"

Expand All @@ -24,31 +24,30 @@ classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities"
"Topic :: Utilities",
"Typing :: Typed",
]

[tool.poetry.urls]
"Funding" = "https://github.com/sponsors/wemake-services"

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.9"

[tool.poetry.group.test.dependencies]
mypy = "^0.982"
[tool.poetry.group.dev.dependencies]
mypy = "^1.9"

wemake-python-styleguide = "^0.17"
wemake-python-styleguide = "^0.19"
flake8-pytest-style = "^1.5"
nitpick = "^0.29"
nitpick = "^0.35"

safety = "^2.2"

pytest = "^6.2"
pytest-cov = "^3.0"
pytest-randomly = "^3.10"
pytest = "^8.1"
pytest-cov = "^5.0"
pytest-randomly = "^3.12"


[build-system]
requires = ["poetry-core>=1.2.0"]
requires = ["poetry-core>=1.9.0"]
build-backend = "poetry.core.masonry.api"


Expand Down
2 changes: 1 addition & 1 deletion safe_assert/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional


def safe_assert( # type: ignore
def safe_assert(
expression: bool,
message: Optional[str] = None,
) -> None:
Expand Down
30 changes: 11 additions & 19 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ignore = D100, D104, D401, W504, X100, RST303, RST304, DAR103, DAR203
# isort configuration:
# https://github.com/timothycrosley/isort/wiki/isort-Settings
profile = wemake
line_length = 80


[tool:pytest]
Expand Down Expand Up @@ -65,23 +66,14 @@ addopts =

[mypy]
# The mypy configurations: http://bit.ly/2zEl9WI
enable_error_code = truthy-bool, redundant-expr

allow_redefinition = false
check_untyped_defs = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
ignore_errors = false
ignore_missing_imports = true
implicit_reexport = false
local_partial_types = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
enable_error_code =
truthy-bool,
truthy-iterable,
redundant-expr,
unused-awaitable,
ignore-without-code,
possibly-undefined,
redundant-self,

strict = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true

0 comments on commit c85559b

Please sign in to comment.