Bump future from 0.18.2 to 0.18.3 (#1970)

* Bump future from 0.18.2 to 0.18.3

Bumps [future](https://github.com/PythonCharmers/python-future) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/PythonCharmers/python-future/releases)
- [Changelog](https://github.com/PythonCharmers/python-future/blob/master/docs/changelog.rst)
- [Commits](https://github.com/PythonCharmers/python-future/compare/v0.18.2...v0.18.3)

---
updated-dependencies:
- dependency-name: future
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update future==0.18.3

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2023-03-02 20:53:26 -08:00 committed by GitHub
commit 9f727d0086
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 196 additions and 115 deletions

View file

@ -92,7 +92,12 @@ class FixDivisionSafe(fixer_base.BaseFix):
else:
children.append(child.clone())
if matched:
return Node(node.type, children, fixers_applied=node.fixers_applied)
# In Python 2.6, `Node` does not have the fixers_applied attribute
# https://github.com/python/cpython/blob/8493c0cd66cfc181ac1517268a74f077e9998701/Lib/lib2to3/pytree.py#L235
if hasattr(Node, "fixers_applied"):
return Node(node.type, children, fixers_applied=node.fixers_applied)
else:
return Node(node.type, children)
return False

View file

@ -57,6 +57,16 @@ class FixPrint(fixer_base.BaseFix):
if args and args[-1] == Comma():
args = args[:-1]
end = " "
# try to determine if the string ends in a non-space whitespace character, in which
# case there should be no space at the end of the conversion
string_leaves = [leaf for leaf in args[-1].leaves() if leaf.type == token.STRING]
if (
string_leaves
and string_leaves[-1].value[0] != "r" # "raw" string
and string_leaves[-1].value[-3:-1] in (r"\t", r"\n", r"\r")
):
end = ""
if args and args[0] == pytree.Leaf(token.RIGHTSHIFT, u">>"):
assert len(args) >= 2
file = args[1].clone()

View file

@ -94,7 +94,7 @@ class FixRaise(fixer_base.BaseFix):
args = [exc, Comma(), val]
if tb is not None:
args += [Comma(), tb]
return Call(Name(u"raise_"), args)
return Call(Name(u"raise_"), args, prefix=node.prefix)
if tb is not None:
tb.prefix = ""