Skip to content

Commit

Permalink
Merge pull request #7 from pomponchik/develop
Browse files Browse the repository at this point in the history
0.0.10
  • Loading branch information
pomponchik committed Jan 7, 2024
2 parents 021435d + 69f9905 commit 9f56e3e
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:

- name: Run mypy
shell: bash
run: mypy f --strict --implicit-reexport
run: mypy f --strict
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
branches:
- main

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
shell: bash
run: pip install -r requirements_dev.txt

- name: Build the project
shell: bash
run: python -m build .

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[![Downloads](https://static.pepy.tech/badge/fazy/month)](https://pepy.tech/project/fazy)
[![Downloads](https://static.pepy.tech/badge/fazy)](https://pepy.tech/project/fazy)
[![codecov](https://codecov.io/gh/pomponchik/fazy/branch/main/graph/badge.svg)](https://codecov.io/gh/pomponchik/fazy)
[![Test-Package](https://github.com/pomponchik/fazy/actions/workflows/coverage.yml/badge.svg)](https://github.com/pomponchik/fazy/actions/workflows/coverage.yml)
[![Hits-of-Code](https://hitsofcode.com/github/pomponchik/fazy?branch=main)](https://hitsofcode.com/github/pomponchik/fazy/view?branch=main)
[![Tests](https://github.com/pomponchik/fazy/actions/workflows/tests_and_coverage.yml/badge.svg)](https://github.com/pomponchik/fazy/actions/workflows/tests_and_coverage.yml)
[![PyPI version](https://badge.fury.io/py/fazy.svg)](https://badge.fury.io/py/fazy)
[![Python versions](https://img.shields.io/pypi/pyversions/fazy.svg)](https://pypi.python.org/pypi/fazy)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
Expand Down
2 changes: 1 addition & 1 deletion f/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from f.proxy_module import ProxyModule
from f.proxy_module import ProxyModule as ProxyModule


sys.modules[__name__].__class__ = ProxyModule
4 changes: 2 additions & 2 deletions f/lazy_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ def expandtabs(self, tabsize: int = 8) -> str:
def removeprefix(self, prefix: Union['LazyString', str]) -> str:
if isinstance(prefix, type(self)):
prefix = prefix.data
return self.data.removeprefix(prefix) # type: ignore[attr-defined, no-any-return]
return self.data.removeprefix(prefix) # type: ignore[attr-defined, no-any-return, unused-ignore]

def removesuffix(self, suffix: Union['LazyString', str]) -> str:
if isinstance(suffix, type(self)):
suffix = suffix.data
return self.data.removesuffix(suffix) # type: ignore[attr-defined, no-any-return]
return self.data.removesuffix(suffix) # type: ignore[attr-defined, no-any-return, unused-ignore]

def lstrip(self, chars: Optional[Union['LazyString', str]] = None) -> str:
if isinstance(chars, type(self)):
Expand Down
Empty file added f/py.typed
Empty file.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'fazy'
version = '0.0.9'
version = '0.0.10'
authors = [
{ name='Evgeniy Blinov', email='zheni-b@yandex.ru' },
]
Expand All @@ -28,6 +28,9 @@ classifiers = [
'Topic :: Software Development :: Libraries',
]

[tool.setuptools.package-data]
"fazy" = ["py.typed"]

[project.urls]
'Source' = 'https://github.com/pomponchik/fazy'
'Tracker' = 'https://github.com/pomponchik/fazy/issues'

0 comments on commit 9f56e3e

Please sign in to comment.