Skip to content
Closed
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
11 changes: 8 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ on:
- push

jobs:
mypy:
name: mypy
lint:
name: ${{ matrix.tox-target }}
runs-on: ubuntu-latest
strategy:
matrix:
tox-target:
- lint
- mypy

steps:
- uses: actions/checkout@master
Expand All @@ -19,7 +24,7 @@ jobs:
run: pip install tox

- name: Run tests
run: tox -e mypy
run: tox -e ${{ matrix.tox-target }}

tests:
name: Python ${{ matrix.python-version }}
Expand Down
11 changes: 7 additions & 4 deletions create_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@


def read_version():
with open(os.path.join('freezegun', '__init__.py')) as f:
m = re.search(r'''__version__\s*=\s*['"]([^'"]*)['"]''', f.read())
with open(os.path.join("freezegun", "__init__.py")) as f:
m = re.search(r"""__version__\s*=\s*['"]([^'"]*)['"]""", f.read())
if m:
return m.group(1)
raise ValueError("couldn't find version")


def create_tag():
from subprocess import call

version = read_version()
errno = call(['git', 'tag', '--annotate', version, '--message', 'Version %s' % version])
errno = call(
["git", "tag", "--annotate", version, "--message", "Version %s" % version]
)
if errno == 0:
print("Added tag for version %s" % version)


if __name__ == '__main__':
if __name__ == "__main__":
create_tag()
10 changes: 5 additions & 5 deletions freezegun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from .api import freeze_time
from .config import configure

__title__ = 'freezegun'
__version__ = '1.1.0'
__author__ = 'Steve Pulec'
__license__ = 'Apache License 2.0'
__copyright__ = 'Copyright 2012 Steve Pulec'
__title__ = "freezegun"
__version__ = "1.1.0"
__author__ = "Steve Pulec"
__license__ = "Apache License 2.0"
__copyright__ = "Copyright 2012 Steve Pulec"


__all__ = ["freeze_time", "configure"]
1 change: 0 additions & 1 deletion freezegun/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from .api import freeze_time as freeze_time

1 change: 0 additions & 1 deletion freezegun/_async.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import functools
from typing import Any, Callable, TypeVar, cast


_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])


Expand Down
Loading