Skip to content

Commit

Permalink
Revert "pyupgrade --py37-plus **/*.py"
Browse files Browse the repository at this point in the history
This reverts commit 12f8cbe.

This commit introduced a series of unit test failures, although
I'm not completely sure why.
  • Loading branch information
bgreen-litl committed Oct 20, 2022
1 parent 54e7857 commit a1e19d9
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions backoff/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
"""
Function decoration for backoff and retry
Expand Down
1 change: 1 addition & 0 deletions backoff/_async.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import datetime
import functools
import asyncio
Expand Down
2 changes: 2 additions & 0 deletions backoff/_common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding:utf-8

import functools
import logging
import sys
Expand Down
1 change: 1 addition & 0 deletions backoff/_decorator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import asyncio
import logging
import operator
Expand Down
2 changes: 2 additions & 0 deletions backoff/_jitter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding:utf-8

import random


Expand Down
1 change: 1 addition & 0 deletions backoff/_sync.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import datetime
import functools
import time
Expand Down
1 change: 1 addition & 0 deletions backoff/_typing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import logging
import sys
from typing import (Any, Callable, Coroutine, Dict, Generator, Sequence, Tuple,
Expand Down
5 changes: 4 additions & 1 deletion backoff/_wait_gen.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding:utf-8

import itertools
from typing import Any, Callable, Generator, Iterable, Optional, Union

Expand Down Expand Up @@ -66,7 +68,8 @@ def constant(
except TypeError:
itr = itertools.repeat(interval) # type: ignore

yield from itr
for val in itr:
yield val


def runtime(
Expand Down
1 change: 1 addition & 0 deletions backoff/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
from ._typing import Details

__all__ = [
Expand Down
1 change: 1 addition & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import collections
import functools

Expand Down
1 change: 1 addition & 0 deletions tests/test_backoff.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import datetime
import itertools
import logging
Expand Down
2 changes: 2 additions & 0 deletions tests/test_backoff_async.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding:utf-8

import asyncio # Python 3.5 code and syntax is allowed in this file
import random

Expand Down
1 change: 1 addition & 0 deletions tests/test_jitter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import backoff


Expand Down
2 changes: 2 additions & 0 deletions tests/test_types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# coding:utf-8

from backoff.types import Details


Expand Down
1 change: 1 addition & 0 deletions tests/test_wait_gen.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding:utf-8
import backoff


Expand Down

0 comments on commit a1e19d9

Please sign in to comment.