提交 48064140 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #4788 from slefrancois/flake8_new_api

Flake8 new api
......@@ -11,13 +11,13 @@ You want to contribute to Theano? That is great! This page explain our
workflow and some resource for doing so.
Looking for an idea for a first contribution? Check `github issue
<https://github.com/Theano/Theano/issues?q=is%3Aopen+is%3Aissue+label%3A%22Easy+fix%22>`
<https://github.com/Theano/Theano/issues?q=is%3Aopen+is%3Aissue+label%3A%22Easy+fix%22>`_
with a label ``easy fix``. They are good starter. It is recommanded
that you write on the issue you want to work on it. This help make
sure it is up to date and see if nobody else is working on it. Also,
we can sometimes provides more information about it. There is also
the label `NeedSomeoneToFinish
<https://github.com/Theano/Theano/labels/NeedSomeoneToFinish>` that is
<https://github.com/Theano/Theano/labels/NeedSomeoneToFinish>`_ that is
interresting to check. The difficulty level is variable.
Resources
......@@ -126,7 +126,11 @@ To setup VIM:
#. Install flake8 (if not already installed) with::
pip install flake8
pip install "flake8<3"
.. warning:: Starting version 3.0.0, flake8 changed its dependancies and
moved its Python API to a legacy module, breaking Theano's flake8 tests.
We recommend using a version prior to 3.
.. note:: You can use ``easy_install`` instead of ``pip``, and ``pep8``
instead of ``flake8`` if you prefer. The important thing is that the
......
......@@ -166,7 +166,7 @@ def do_setup():
install_requires=['numpy>=1.7.1', 'scipy>=0.11', 'six>=1.9.0'],
# pygments is a dependency for Sphinx code highlight
extras_require={
'test': ['nose>=1.3.0', 'nose-parameterized>=0.5.0'],
'test': ['nose>=1.3.0', 'nose-parameterized>=0.5.0', 'flake8<3'],
'doc': ['Sphinx>=0.5.1', 'pygments']
},
package_data={
......
......@@ -145,4 +145,4 @@ except ImportError:
release_lock()
from lazylinker_ext.lazylinker_ext import * # noqa
assert force_compile or (version == get_version())
assert force_compile or (version == get_version()) # noqa
......@@ -5,7 +5,8 @@ from theano.gof.type import Type
from theano.gof import graph
from theano.gof.graph import Variable, Apply
from theano.gof.op import Op
from theano.gof.opt import * # noqa
from theano.gof.opt import (OpKeyOptimizer, PatternSub, NavigatorOptimizer,
TopoOptimizer, OpSub)
from theano.gof import destroyhandler
from theano.gof.fg import FunctionGraph, InconsistencyError
......
......@@ -11,7 +11,7 @@ from theano.gof.type import Type
from theano.gof.op import Op
from theano.gof import fg
from theano.gof.link import * # noqa
from theano.gof.link import PerformLinker, WrapLinker, Container
from theano.compat import cmp
......
......@@ -3,9 +3,11 @@ from __future__ import absolute_import, print_function, division
from theano.gof.type import Type
from theano.gof.graph import Variable, Apply, Constant
from theano.gof.op import Op
from theano.gof.opt import * # noqa
from theano.gof.opt import (OpKeyOptimizer, PatternSub, TopoOptimizer, OpSub,
MergeOptimizer, config, theano,
EquilibriumOptimizer, logging, pre_constant_merge,
pre_greedy_local_optimizer)
from theano.gof.fg import FunctionGraph
from theano.gof.toolbox import * # noqa
from theano import tensor as T
......
......@@ -5,7 +5,7 @@ from theano.gof.type import Type
from theano.gof.op import Op
from theano.gof.fg import FunctionGraph
from theano.gof.toolbox import * # noqa
from theano.gof.toolbox import NodeFinder
def as_variable(x):
......
......@@ -29,7 +29,8 @@ __contact__ = "Saizheng Zhang <saizhenglisa..at..gmail.com>"
# - "'absolute_import' present"
# - "'print_function' present"
# Redundant error code generated by flake8-future-import module
ignore = ('E501', 'E123', 'E133', 'FI12', 'FI14', 'FI15', 'FI16', 'FI17', 'FI50', 'FI51', 'FI53')
ignore = ('E501', 'E123', 'E133', 'FI12', 'FI14', 'FI15', 'FI16', 'FI17',
'FI50', 'FI51', 'FI53')
whitelist_flake8 = [
"compat/six.py", # This is bundled code that will be deleted, don't fix it
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论