summaryrefslogtreecommitdiff
path: root/docs/source
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2021-03-31 14:22:37 +0000
committerAnthony Sottile <asottile@umich.edu>2021-03-31 14:22:37 +0000
commite0116d8e77fb04acc62095734ec49e779f24ee54 (patch)
tree382ad5e83f6512ff157553c6a8c16b63569cec70 /docs/source
parent1d5dd156ab9f2e37e40f95eb15c5a2c2cd49a7a9 (diff)
parentedadccd8dcf5fc1de86116adb5f9f13ed1b68637 (diff)
downloadflake8-e0116d8e77fb04acc62095734ec49e779f24ee54.tar.gz
Merge branch 'py3_plus' into 'master'
drop legacy python versions Closes #690 See merge request pycqa/flake8!471
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/conf.py19
-rw-r--r--docs/source/internal/releases.rst4
-rw-r--r--docs/source/internal/writing-code.rst6
-rw-r--r--docs/source/plugin-development/registering-plugins.rst1
-rw-r--r--docs/source/requirements.txt1
-rw-r--r--docs/source/user/error-codes.rst5
-rw-r--r--docs/source/user/invocation.rst10
-rw-r--r--docs/source/user/using-plugins.rst4
8 files changed, 17 insertions, 33 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py
index dd2003f..97860c9 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# flake8 documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 19 07:14:10 2016.
@@ -11,9 +10,8 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.
-
-import sys
import os
+import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -53,11 +51,12 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'flake8'
-copyright = u'2016, Ian Stapleton Cordasco'
-author = u'Ian Stapleton Cordasco'
+project = 'flake8'
+copyright = '2016, Ian Stapleton Cordasco'
+author = 'Ian Stapleton Cordasco'
import flake8
+
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
@@ -234,8 +233,8 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- (master_doc, 'flake8.tex', u'flake8 Documentation',
- u'Ian Stapleton Cordasco', 'manual'),
+ (master_doc, 'flake8.tex', 'flake8 Documentation',
+ 'Ian Stapleton Cordasco', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -264,7 +263,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('manpage', 'flake8', u'Flake8 Command Line Documentation',
+ ('manpage', 'flake8', 'Flake8 Command Line Documentation',
[author], 1)
]
@@ -278,7 +277,7 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'Flake8', u'Flake8 Documentation', u'Tarek Ziade',
+ ('index', 'Flake8', 'Flake8 Documentation', 'Tarek Ziade',
'Flake8', 'Code checking using pycodestyle, pyflakes and mccabe',
'Miscellaneous'),
]
diff --git a/docs/source/internal/releases.rst b/docs/source/internal/releases.rst
index 0ed0ac9..03178a4 100644
--- a/docs/source/internal/releases.rst
+++ b/docs/source/internal/releases.rst
@@ -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``)
diff --git a/docs/source/internal/writing-code.rst b/docs/source/internal/writing-code.rst
index d8c63fe..daf1d57 100644
--- a/docs/source/internal/writing-code.rst
+++ b/docs/source/internal/writing-code.rst
@@ -175,11 +175,7 @@ across multiple lines, insert a new-line after the opening parenthesis, e.g.,
statistic = next(stats_for_error_code)
count = statistic.count
count += sum(stat.count for stat in stats_for_error_code)
- self._write('{count:<5} {error_code} {message}'.format(
- count=count,
- error_code=error_code,
- message=statistic.message,
- ))
+ self._write(f'{count:<5} {error_code} {statistic.message}')
In the first example, we put a few of the parameters all on one line, and then
added the last two on their own. In the second example, each parameter has its
diff --git a/docs/source/plugin-development/registering-plugins.rst b/docs/source/plugin-development/registering-plugins.rst
index 34b368a..d1718bf 100644
--- a/docs/source/plugin-development/registering-plugins.rst
+++ b/docs/source/plugin-development/registering-plugins.rst
@@ -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",
diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt
index 3a7ffae..984ca54 100644
--- a/docs/source/requirements.txt
+++ b/docs/source/requirements.txt
@@ -1,5 +1,4 @@
sphinx>=1.3.0,!=3.1.0
sphinx_rtd_theme
sphinx-prompt
-configparser
flake8-polyfill
diff --git a/docs/source/user/error-codes.rst b/docs/source/user/error-codes.rst
index e74675f..9eab3f7 100644
--- a/docs/source/user/error-codes.rst
+++ b/docs/source/user/error-codes.rst
@@ -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.
diff --git a/docs/source/user/invocation.rst b/docs/source/user/invocation.rst
index 099b72a..4c141fd 100644
--- a/docs/source/user/invocation.rst
+++ b/docs/source/user/invocation.rst
@@ -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|:
diff --git a/docs/source/user/using-plugins.rst b/docs/source/user/using-plugins.rst
index 3971578..eddb258 100644
--- a/docs/source/user/using-plugins.rst
+++ b/docs/source/user/using-plugins.rst
@@ -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: