Skip to content

Commit

Permalink
Merge branch 'dev' into ip-address-field
Browse files Browse the repository at this point in the history
  • Loading branch information
mgetka authored Sep 16, 2020
2 parents f8a53fa + 2708795 commit 1a7d92d
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.6.2
rev: v2.7.2
hooks:
- id: pyupgrade
args: ["--py3-plus"]
- repo: https://github.com/python/black
rev: 19.10b0
rev: 20.8b1
hooks:
- id: black
language_version: python3
Expand All @@ -19,7 +19,7 @@ repos:
hooks:
- id: mypy
- repo: https://github.com/asottile/blacken-docs
rev: v1.7.0
rev: v1.8.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.10b0]
additional_dependencies: [black==20.8b1]
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,5 @@ Contributors (chronological)
- `@weeix <https://github.com/weeix>`_
- Juan Norris `@juannorris <https://github.com/juannorris>`_
- 장준영 `@jun0jang <https://github.com/jun0jang>`_
- `@ebargtuo <https://github.com/ebargtuo>`_
- Michał Getka `@mgetka <https://github.com/mgetka>`_
10 changes: 9 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
---------

3.7.2 (unreleased)
******************

Bug fixes:

- Fix typing in ``AwareDateTime`` (:pr:`1658`). Thanks :user:`adithyabsk` for
reporting.

3.7.1 (2020-07-20)
******************

Expand Down Expand Up @@ -35,7 +43,7 @@ Support:
- Documentation: improve custom fields example (:issue:`1538`).
Thanks :user:`pablospizzamiglio` for reporting the problem with the
old example and thanks :user:`Resinderate` for the PR.
- Documentation: Split up API reference into multiple pages and
- Documentation: Split up API reference into multiple pages and
add summary tables (:pr:`1587`). Thanks :user:`EpicWink` for the PR.

3.6.0 (2020-05-08)
Expand Down
8 changes: 5 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
master_doc = "index"

project = "marshmallow"
copyright = ' {:%Y} <a href="https://stevenloria.com">Steven Loria</a> and contributors'.format(
dt.datetime.utcfromtimestamp(os.path.getmtime("../CHANGELOG.rst"))
copyright = (
' {:%Y} <a href="https://stevenloria.com">Steven Loria</a> and contributors'.format(
dt.datetime.utcfromtimestamp(os.path.getmtime("../CHANGELOG.rst"))
)
)

version = release = marshmallow.__version__
Expand Down Expand Up @@ -101,7 +103,7 @@
'<a href="https://colorofchange.org/">Color of Change</a>.'
),
"2.x-line": (
"marshmallow 2 will no longer be supported as of 2020-08-18. "
"marshmallow 2 is no longer supported as of 2020-08-18. "
'<a href="https://marshmallow.readthedocs.io/en/latest/upgrading.html#upgrading-to-3-0">'
"Update your code to use marshmallow 3</a>."
),
Expand Down
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Run the app.
.. code-block:: bash
$ pip install flask peewee
$ python examples/flask_example.py
$ python examples/peewee_example.py
After registering a user and creating some todo items in the database, here is an example response.

Expand Down
3 changes: 1 addition & 2 deletions examples/peewee_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ def make_object(self, data, **kwargs):


def check_auth(email, password):
"""Check if a username/password combination is valid.
"""
"""Check if a username/password combination is valid."""
try:
user = User.get(User.email == email)
except User.DoesNotExist:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"pre-commit~=2.4",
],
"docs": [
"sphinx==3.2.0",
"sphinx==3.2.1",
"sphinx-issues==1.2.0",
"alabaster==0.7.12",
"sphinx-version-warning==1.1.2",
"autodocsumm==0.1.13",
"autodocsumm==0.2.0",
],
}
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
Expand Down
3 changes: 1 addition & 2 deletions src/marshmallow/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@


class FieldABC:
"""Abstract base class from which all Field classes inherit.
"""
"""Abstract base class from which all Field classes inherit."""

parent = None
name = None
Expand Down
2 changes: 1 addition & 1 deletion src/marshmallow/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ class AwareDateTime(DateTime):
AWARENESS = "aware"

def __init__(
self, format: str = None, *, default_timezone: dt.timezone = None, **kwargs
self, format: str = None, *, default_timezone: dt.tzinfo = None, **kwargs
):
super().__init__(format=format, **kwargs)
self.default_timezone = default_timezone
Expand Down
6 changes: 2 additions & 4 deletions src/marshmallow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ def __repr__(self):


def is_generator(obj) -> bool:
"""Return True if ``obj`` is a generator
"""
"""Return True if ``obj`` is a generator"""
return inspect.isgeneratorfunction(obj) or inspect.isgenerator(obj)


Expand Down Expand Up @@ -279,8 +278,7 @@ def set_value(dct: typing.Dict[str, typing.Any], key: str, value: typing.Any):


def callable_or_raise(obj):
"""Check that an object is callable, else raise a :exc:`ValueError`.
"""
"""Check that an object is callable, else raise a :exc:`ValueError`."""
if not callable(obj):
raise ValueError("Object {!r} is not callable.".format(obj))
return obj
Expand Down

0 comments on commit 1a7d92d

Please sign in to comment.