mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 19:26:52 +00:00
some manual python2 metadata cleanup
This commit is contained in:
parent
55f29c636f
commit
8cc3fc01e8
13 changed files with 14 additions and 79 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# To activate, change the Appveyor settings to use `.appveyor.yml`.
|
||||
install:
|
||||
- python -m pip install --upgrade setuptools tox virtualenv
|
||||
- C:\Python38-x64\python.exe -m pip install --upgrade setuptools tox virtualenv
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- python -m tox -e py27,py36,py37,dogfood
|
||||
- C:\Python38-x64\python.exe -m tox -e py36,py37,dogfood
|
||||
|
|
|
|||
|
|
@ -13,26 +13,11 @@ after_script:
|
|||
- pip install codecov
|
||||
- codecov --token=7d117e6b-aab6-4283-ab19-166dafc38cf5
|
||||
|
||||
pypy2:
|
||||
image: pypy:2.7-7.2.0
|
||||
stage: test
|
||||
script: tox -e pypy
|
||||
|
||||
pypy3:
|
||||
image: pypy:3.6-7.2.0
|
||||
stage: test
|
||||
script: tox -e pypy3
|
||||
|
||||
python2:
|
||||
image: python:2.7
|
||||
stage: test
|
||||
script: tox -e py27
|
||||
|
||||
python35:
|
||||
image: python:3.5
|
||||
stage: test
|
||||
script: tox -e py35
|
||||
|
||||
python36:
|
||||
image: python:3.6
|
||||
stage: test
|
||||
|
|
|
|||
|
|
@ -11,18 +11,12 @@ notifications:
|
|||
|
||||
matrix:
|
||||
include:
|
||||
- python: 2.7
|
||||
env: TOXENV=py27
|
||||
- python: 3.5
|
||||
env: TOXENV=py35
|
||||
- python: 3.6
|
||||
env: TOXENV=py36
|
||||
- python: 3.7
|
||||
env: TOXENV=py37
|
||||
- python: 3.8
|
||||
env: TOXENV=py38
|
||||
- python: pypy
|
||||
env: TOXENV=pypy
|
||||
- python: 3.7
|
||||
env: TOXENV=readme
|
||||
- python: 3.7
|
||||
|
|
|
|||
|
|
@ -81,13 +81,11 @@ for users.
|
|||
|
||||
Before releasing, the following tox test environments must pass:
|
||||
|
||||
- Python 2.7 (a.k.a., ``tox -e py27``)
|
||||
|
||||
- Python 3.6 (a.k.a., ``tox -e py36``)
|
||||
|
||||
- Python 3.7 (a.k.a., ``tox -e py37``)
|
||||
|
||||
- PyPy (a.k.a., ``tox -e pypy``)
|
||||
- PyPy 3 (a.k.a., ``tox -e pypy3``)
|
||||
|
||||
- Linters (a.k.a., ``tox -e linters``)
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ like:
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Topic :: Software Development :: Quality Assurance",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
sphinx>=1.3.0,!=3.1.0
|
||||
sphinx_rtd_theme
|
||||
sphinx-prompt
|
||||
configparser
|
||||
flake8-polyfill
|
||||
|
|
|
|||
|
|
@ -100,8 +100,6 @@ generates its own :term:`error code`\ s for ``pyflakes``:
|
|||
+------+---------------------------------------------------------------------+
|
||||
| F811 | redefinition of unused ``name`` from line ``N`` |
|
||||
+------+---------------------------------------------------------------------+
|
||||
| F812 | list comprehension redefines ``name`` from line ``N`` |
|
||||
+------+---------------------------------------------------------------------+
|
||||
| F821 | undefined name ``name`` |
|
||||
+------+---------------------------------------------------------------------+
|
||||
| F822 | undefined name ``name`` in ``__all__`` |
|
||||
|
|
@ -116,9 +114,6 @@ generates its own :term:`error code`\ s for ``pyflakes``:
|
|||
| F901 | ``raise NotImplemented`` should be ``raise NotImplementedError`` |
|
||||
+------+---------------------------------------------------------------------+
|
||||
|
||||
Note that some of these entries behave differently on Python 2 and Python 3,
|
||||
for example F812 is specific to Python 2 only.
|
||||
|
||||
We also report one extra error: ``E999``. We report ``E999`` when we fail to
|
||||
compile a file into an Abstract Syntax Tree for the plugins that require it.
|
||||
|
||||
|
|
|
|||
|
|
@ -14,25 +14,25 @@ like so:
|
|||
|
||||
Where you simply allow the shell running in your terminal to locate |Flake8|.
|
||||
In some cases, though, you may have installed |Flake8| for multiple versions
|
||||
of Python (e.g., Python 2.7 and Python 3.5) and you need to call a specific
|
||||
of Python (e.g., Python 3.8 and Python 3.9) and you need to call a specific
|
||||
version. In that case, you will have much better results using:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python2.7 -m flake8
|
||||
python3.8 -m flake8
|
||||
|
||||
Or
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.5 -m flake8
|
||||
python3.9 -m flake8
|
||||
|
||||
Since that will tell the correct version of Python to run |Flake8|.
|
||||
|
||||
.. note::
|
||||
|
||||
Installing |Flake8| once will not install it on both Python 2.7 and
|
||||
Python 3.5. It will only install it for the version of Python that
|
||||
Installing |Flake8| once will not install it on both Python 3.8 and
|
||||
Python 3.9. It will only install it for the version of Python that
|
||||
is running pip.
|
||||
|
||||
It is also possible to specify command-line options directly to |Flake8|:
|
||||
|
|
|
|||
|
|
@ -24,10 +24,8 @@ appropriate of:
|
|||
pip install <plugin-name>
|
||||
pip3 install <plugin-name>
|
||||
python -m pip install <plugin-name>
|
||||
python2.7 -m pip install <plugin-name>
|
||||
python3 -m pip install <plugin-name>
|
||||
python3.4 -m pip install <plugin-name>
|
||||
python3.5 -m pip install <plugin-name>
|
||||
python3.9 -m pip install <plugin-name>
|
||||
|
||||
To install the plugin, where ``<plugin-name>`` is the package name on PyPI_.
|
||||
To verify installation use:
|
||||
|
|
|
|||
|
|
@ -21,11 +21,9 @@ setuptools.setup(
|
|||
'Framework :: Flake8',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
'Topic :: Software Development :: Quality Assurance',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
[pytest]
|
||||
norecursedirs = .git .* *.egg* old docs dist build
|
||||
addopts = -rw
|
||||
filterwarnings =
|
||||
error
|
||||
# python3.4 raises this when importing setuptools
|
||||
ignore:The value of convert_charrefs will become True in 3.5.*:DeprecationWarning
|
||||
# python3 raises this when importing setuptools
|
||||
ignore:the imp module is deprecated in favour of importlib.*:PendingDeprecationWarning
|
||||
ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning
|
||||
filterwarnings = error
|
||||
|
|
|
|||
|
|
@ -20,10 +20,7 @@ classifiers =
|
|||
Intended Audience :: Developers
|
||||
License :: OSI Approved :: MIT License
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.5
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
|
|
@ -44,13 +41,9 @@ install_requires=
|
|||
pyflakes >= 2.3.0, < 2.4.0
|
||||
pycodestyle >= 2.7.0, < 2.8.0
|
||||
mccabe >= 0.6.0, < 0.7.0
|
||||
enum34; python_version<"3.4"
|
||||
typing; python_version<"3.5"
|
||||
configparser; python_version<"3.2"
|
||||
functools32; python_version<"3.2"
|
||||
importlib-metadata; python_version<"3.8"
|
||||
|
||||
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
|
||||
python_requires = >=3.6
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
||||
|
|
|
|||
20
tox.ini
20
tox.ini
|
|
@ -1,10 +1,9 @@
|
|||
[tox]
|
||||
minversion=2.3.1
|
||||
envlist = py27,py35,py36,py37,py38,flake8,linters,docs
|
||||
envlist = py36,py37,py38,flake8,linters,docs
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
mock>=2.0.0
|
||||
pytest!=3.0.5,!=5.2.3
|
||||
coverage
|
||||
commands =
|
||||
|
|
@ -14,14 +13,8 @@ commands =
|
|||
# ensure 100% coverage of tests
|
||||
coverage report --fail-under 100 --include tests/*
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
.
|
||||
commands = {posargs}
|
||||
|
||||
# Dogfood our current master version
|
||||
[testenv:dogfood]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
wheel
|
||||
|
|
@ -33,7 +26,6 @@ commands =
|
|||
|
||||
# Linters
|
||||
[testenv:flake8]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
flake8
|
||||
|
|
@ -46,7 +38,6 @@ commands =
|
|||
flake8 src/flake8/ tests/ setup.py
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
pyflakes
|
||||
|
|
@ -55,7 +46,6 @@ commands =
|
|||
pylint src/flake8
|
||||
|
||||
[testenv:doc8]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
sphinx
|
||||
|
|
@ -64,14 +54,12 @@ commands =
|
|||
doc8 docs/source/
|
||||
|
||||
[testenv:pre-commit]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps = pre-commit
|
||||
commands =
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
bandit
|
||||
|
|
@ -79,7 +67,6 @@ commands =
|
|||
bandit -r src/flake8/ -c .bandit.yml
|
||||
|
||||
[testenv:linters]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
{[testenv:flake8]deps}
|
||||
|
|
@ -96,7 +83,6 @@ commands =
|
|||
|
||||
# Documentation
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps =
|
||||
-rdocs/source/requirements.txt
|
||||
commands =
|
||||
|
|
@ -104,7 +90,6 @@ commands =
|
|||
sphinx-build -E -W -c docs/source/ -b man docs/source/ docs/build/man
|
||||
|
||||
[testenv:serve-docs]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
changedir = docs/build/html
|
||||
deps =
|
||||
|
|
@ -112,7 +97,6 @@ commands =
|
|||
python -m http.server {posargs}
|
||||
|
||||
[testenv:readme]
|
||||
basepython = python3
|
||||
deps =
|
||||
readme_renderer
|
||||
commands =
|
||||
|
|
@ -120,7 +104,6 @@ commands =
|
|||
|
||||
# Release tooling
|
||||
[testenv:build]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
wheel
|
||||
|
|
@ -129,7 +112,6 @@ commands =
|
|||
python setup.py -q sdist bdist_wheel
|
||||
|
||||
[testenv:release]
|
||||
basepython = python3
|
||||
skip_install = true
|
||||
deps =
|
||||
{[testenv:build]deps}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue