Skip to content

Commit d1b32f6

Browse files
authored
Merge pull request #220 from graingert/update-urls
update various URLs/copyrights to the new pycqa/modernize project
2 parents dd9eea4 + e8f7165 commit d1b32f6

File tree

14 files changed

+369
-348
lines changed

14 files changed

+369
-348
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ repos:
3333
- id: check-merge-conflict
3434
- id: check-toml
3535
- id: check-yaml
36+
- id: mixed-line-ending
3637

3738
- repo: https://github.com/prettier/prettier
3839
rev: 2.1.1

.pre-commit-hooks.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
- id: python-modernize
2-
name: python-modernize
1+
- &modernize
2+
id: modernize
3+
name: modernize
34
description: Modernizes Python code for eventual Python 3 migration.
4-
entry: python-modernize
5+
entry: modernize
56
args: [--write, --fix=default, --nobackups]
67
language: python
78
types: [python]
9+
- <<: *modernize
10+
id: python-modernize
11+
name: modernize (deprecated)
12+
description: "Deprecated in favour of `id: modernize`"

.readthedocs.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
version: 2
2+
3+
sphinx:
4+
fail_on_warning: true
5+
6+
python:
7+
version: 3.8
8+
install:
9+
- method: pip
10+
path: .
11+
extra_requirements:
12+
- docs

CHANGELOG.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Version 0.8rc2-dev
2+
==================
3+
4+
Unreleased.
5+
6+
* add ``modernize`` console_script
7+
* move project to https://github.com/PyCQA/modernize/
8+
19
Version 0.8rc1
210
==============
311

@@ -55,7 +63,7 @@ Released 2014-10-14.
5563
Python 2.6, such as the ``except ... as`` construct, but this was not
5664
documented.)
5765

58-
.. _Documentation: http://python-modernize.readthedocs.org/en/latest/
66+
.. _Documentation: https://modernize.readthedocs.org/en/latest/
5967

6068

6169
Version 0.3
@@ -66,7 +74,7 @@ Released 2014-08-12.
6674
* New fixer for ``raise E, V, T``, changed to ``six.reraise(E, V, T)``.
6775
* New fixer for metaclasses, using ``six.with_metaclass``.
6876
* Avoid adding redundant parentheses to ``print(x)``.
69-
* python-modernize can now be installed and run on Python 3.
77+
* modernize can now be installed and run on Python 3.
7078
* Fixed a bug where ``__future__`` imports were added multiple times.
7179
* Fixed a bug where fixer for ``zip()`` was recognising ``map()``.
7280
* The default is now to leave Unicode literals unchanged.

README.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ This library is a very thin wrapper around `fissix
1010
to make Python 2 code more modern with the intention of eventually
1111
porting it over to Python 3.
1212

13-
The ``python-modernize`` command works like `2to3
14-
<https://docs.python.org/3/library/2to3.html>`_. Here's how you'd rewrite a
13+
The ``python -m modernize`` command works like
14+
``python -m fissix``, see `fissix <https://github.com/jreese/fissix>`_.
15+
Here's how you'd rewrite a
1516
single file::
1617

17-
python-modernize -w example.py
18+
python -m modernize -w example.py
1819

1920
It does not guarantee, but it attempts to spit out a codebase compatible
2021
with Python 2.6+ or Python 3. The code that it generates has a runtime
@@ -23,18 +24,18 @@ dependency on `six <https://pypi.python.org/pypi/six>`_, unless the
2324
recommended. Some of the fixers output code that is not compatible with
2425
Python 2.5 or lower.
2526

26-
**Documentation:** `python-modernize.readthedocs.io
27-
<https://python-modernize.readthedocs.io/>`_.
27+
**Documentation:** `modernize.readthedocs.io
28+
<https://modernize.readthedocs.io/>`_.
2829

29-
See the ``LICENSE`` file for the license of ``python-modernize``.
30+
See the ``LICENSE`` file for the license of ``modernize``.
3031
Using this tool does not affect licensing of the modernized code.
3132

32-
.. image:: https://readthedocs.org/projects/python-modernize/badge/
33-
:target: https://readthedocs.org/projects/python-modernize/?badge=latest
33+
.. image:: https://readthedocs.org/projects/modernize/badge/
34+
:target: https://readthedocs.org/projects/modernize/?badge=latest
3435
:alt: Documentation Status
3536

36-
.. image:: https://api.travis-ci.org/python-modernize/python-modernize.svg?branch=master
37-
:target: https://travis-ci.org/python-modernize/python-modernize
37+
.. image:: https://api.travis-ci.org/pycqa/modernize.svg?branch=master
38+
:target: https://travis-ci.org/pycqa/modernize
3839

39-
.. image:: https://coveralls.io/repos/python-modernize/python-modernize/badge.png?branch=master
40-
:target: https://coveralls.io/r/python-modernize/python-modernize?branch=master
40+
.. image:: https://coveralls.io/repos/pycqa/modernize/badge.png?branch=master
41+
:target: https://coveralls.io/r/pycqa/modernize?branch=master

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BUILDDIR = _build
99

1010
# User-friendly check for sphinx-build
1111
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12-
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/)
1313
endif
1414

1515
# Internal variables.

docs/conf.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313

1414
from __future__ import generator_stop
1515

16-
import os
17-
import sys
18-
19-
# If extensions (or modules to document with autodoc) are in another directory,
20-
# add these directories to sys.path here. If the directory is relative to the
21-
# documentation root, use os.path.abspath to make it absolute, like shown here.
22-
sys.path.insert(0, os.path.abspath("sphinxext"))
23-
2416
# -- General configuration ------------------------------------------------
2517

2618
# If your documentation needs a minimal Sphinx version, state it here.
@@ -29,7 +21,7 @@
2921
# Add any Sphinx extension module names here, as strings. They can be
3022
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3123
# ones.
32-
extensions = ["extra_types", "sphinx.ext.intersphinx"]
24+
extensions = ["sphinx.ext.intersphinx"]
3325

3426
# Add any paths that contain templates here, relative to this directory.
3527
templates_path = ["_templates"]
@@ -45,7 +37,7 @@
4537

4638
# General information about the project.
4739
project = "modernize"
48-
copyright = "2014, python-modernize team"
40+
copyright = "2014, python-modernize team; 2020 pycqa/modernize team"
4941

5042
# The version info for the project you're documenting, acts as replacement for
5143
# |version| and |release|, also used in various other places throughout the
@@ -95,9 +87,10 @@
9587
# keep_warnings = False
9688

9789
intersphinx_mapping = {
98-
"python": ("http://docs.python.org/3", None),
99-
"python2": ("http://docs.python.org/2", None),
100-
"six": ("http://pythonhosted.org/six/", None),
90+
"python": ("https://docs.python.org/3", None),
91+
"python2": ("https://docs.python.org/2", None),
92+
"six": ("https://six.readthedocs.io/", None),
93+
"fissix": ("https://fissix.readthedocs.io/en/latest/", None),
10194
}
10295

10396

@@ -134,7 +127,7 @@
134127
# Add any paths that contain custom static files (such as style sheets) here,
135128
# relative to this directory. They are copied after the builtin static files,
136129
# so a file named "default.css" will overwrite the builtin "default.css".
137-
html_static_path = ["_static"]
130+
html_static_path = []
138131

139132
# Add any extra paths that contain custom files (such as robots.txt or
140133
# .htaccess) here, relative to this directory. These files are copied
@@ -205,7 +198,7 @@
205198
"index",
206199
"modernize.tex",
207200
"modernize Documentation",
208-
"python-modernize team",
201+
"pycqa/modernize team",
209202
"manual",
210203
)
211204
]
@@ -236,7 +229,7 @@
236229
# One entry per manual page. List of tuples
237230
# (source start file, name, description, authors, manual section).
238231
man_pages = [
239-
("index", "modernize", "modernize Documentation", ["python-modernize team"], 1)
232+
("index", "modernize", "modernize Documentation", ["pycqa/modernize team"], 1)
240233
]
241234

242235
# If true, show URL addresses after external links.
@@ -253,7 +246,7 @@
253246
"index",
254247
"modernize",
255248
"modernize Documentation",
256-
"python-modernize team",
249+
"pycqa/modernize team",
257250
"modernize",
258251
"One line description of project.",
259252
"Miscellaneous",

0 commit comments

Comments
 (0)