Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 27, 2022
1 parent 88055b0 commit 006730a
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# All configuration values have a default; values that are commented out
# serve to show the default.


from __future__ import generator_stop

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'

Expand Down
1 change: 1 addition & 0 deletions modernize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A hack on top of fissix (lib2to3 fork) for modernizing code for hybrid codebases.
"""


from __future__ import generator_stop

__version__ = "0.9rc1.dev0"
1 change: 1 addition & 0 deletions modernize/fixes/fix_dict_six.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Fixer for iterkeys() -> six.iterkeys(), and similarly for iteritems and itervalues.
"""


from __future__ import generator_stop

# Local imports
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_filter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.


from __future__ import generator_stop

from fissix import fixer_util
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_input_six.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014 Python Software Foundation. All rights reserved.


from __future__ import generator_stop

from fissix import fixer_base, fixer_util
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_itertools_imports_six.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) """


from __future__ import generator_stop

# Local imports
Expand Down
4 changes: 2 additions & 2 deletions modernize/fixes/fix_itertools_six.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
If itertools is imported as something else (ie: import itertools as it;
it.izip(spam, eggs)) method calls will not get fixed.
"""
from __future__ import generator_stop

# This is a derived work of Lib/lib2to3/fixes/fix_itertools_import.py. That file
# is under the copyright of the Python Software Foundation and licensed
# under the Python Software Foundation License 2.
Expand All @@ -13,8 +15,6 @@
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013 Python Software Foundation. All rights reserved.
from __future__ import generator_stop

# Local imports
from fissix import fixer_base, fixer_util
from fissix.fixer_util import Name
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_map.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.


from __future__ import generator_stop

from fissix import fixer_util
Expand Down
4 changes: 2 additions & 2 deletions modernize/fixes/fix_metaclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
This fixer also tries very hard to keep original indenting and spacing
in all those corner cases.
"""
from __future__ import generator_stop

# This is a derived work of Lib/lib2to3/fixes/fix_metaclass.py. That file
# is under the copyright of the Python Software Foundation and licensed
# under the Python Software Foundation License 2.
Expand All @@ -22,8 +24,6 @@
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013 Python Software Foundation. All rights reserved.
from __future__ import generator_stop

# Local imports
from fissix import fixer_base, fixer_util
from fissix.fixer_util import Call, Comma, Leaf, Name, Node, syms
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_next.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Fixer for it.next() -> next(it)"""


from __future__ import generator_stop

# Local imports
Expand Down
2 changes: 1 addition & 1 deletion modernize/fixes/fix_raise.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
any client code would have to be changed as well, we don't automate
this.
"""
# Author: Collin Winter, Armin Ronacher
from __future__ import generator_stop

# Author: Collin Winter, Armin Ronacher
from fissix.fixes import fix_raise


Expand Down
2 changes: 1 addition & 1 deletion modernize/fixes/fix_raise_six.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
raise E, V, T -> six.reraise(E, V, T)
"""
# Author : Markus Unterwaditzer
from __future__ import generator_stop

# Author : Markus Unterwaditzer
# Local imports
from fissix import fixer_base, fixer_util
from fissix.fixer_util import Call, Comma, Name
Expand Down
4 changes: 2 additions & 2 deletions modernize/fixes/fix_urllib_six.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
This is a copy of Lib/lib2to3/fixes/fix_urllib.py, but modified to point to the
six.moves locations for new libraries instead of the Python 3 locations.
"""
from __future__ import generator_stop

# This is a derived work of Lib/lib2to3/fixes/fix_urllib.py. That file
# is under the copyright of the Python Software Foundation and licensed
# under the Python Software Foundation License 2.
Expand All @@ -10,8 +12,6 @@
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013 Python Software Foundation. All rights reserved.
from __future__ import generator_stop

from fissix.fixer_util import (
Comma,
FromImport,
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_xrange_six.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.


from __future__ import generator_stop

from fissix import fixer_base, fixer_util
Expand Down
1 change: 1 addition & 0 deletions modernize/fixes/fix_zip.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.


from __future__ import generator_stop

from fissix import fixer_util
Expand Down
1 change: 1 addition & 0 deletions modernize/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
|_|_|_\\___/\\__,_\\___|_| |_||_|_/__\\___|\
"""


from __future__ import generator_stop

import logging
Expand Down
1 change: 1 addition & 0 deletions tests/test_future_behaviour.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Tests for problem with multiple futures added to single file


from __future__ import generator_stop

import os
Expand Down

0 comments on commit 006730a

Please sign in to comment.