Skip to content

Cleanup reference to master branch #15311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!--
Checklist:
- Read the [Contributing Guidelines](https://github.com/python/mypy/blob/master/CONTRIBUTING.md)
- Read the [Contributing Guidelines](https://github.com/python/mypy/blob/main/CONTRIBUTING.md)
- Add tests for all changed behaviour.
- If you can't add a test, please explain why and how you verified your changes work.
- Make sure CI passes.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Trigger wheel build

on:
push:
branches: [main, master, 'release*']
branches: [main, 'release*']
tags: ['*']

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check documentation build
on:
workflow_dispatch:
push:
branches: [main, master, 'release*']
branches: [main, 'release*']
tags: ['*']
pull_request:
paths:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy_primer.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run mypy_primer

on:
# Only run on PR, since we diff against master
# Only run on PR, since we diff against main
pull_request:
paths-ignore:
- 'docs/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on:
workflow_dispatch:
push:
branches: [main, master, 'release*']
branches: [main, 'release*']
tags: ['*']
pull_request:
paths-ignore:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_stubgenc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test stubgenc on pybind11_fixtures
on:
workflow_dispatch:
push:
branches: [main, master, 'release*']
branches: [main, 'release*']
tags: ['*']
pull_request:
paths:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/p

### Mypy Changelog

We now maintain a [changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) in the mypy Git repository. It mirrors the contents of [mypy release blog posts](https://mypy-lang.blogspot.com/). We will continue to also publish release blog posts. In the future, release blog posts will be created based on the changelog near a release date.
We now maintain a [changelog](https://github.com/python/mypy/blob/main/CHANGELOG.md) in the mypy Git repository. It mirrors the contents of [mypy release blog posts](https://mypy-lang.blogspot.com/). We will continue to also publish release blog posts. In the future, release blog posts will be created based on the changelog near a release date.

This was contributed by Shantanu (PR [16280](https://github.com/python/mypy/pull/16280)).

Expand Down
2 changes: 1 addition & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Credits
-------

For a full list of contributors you can mine the commit history:
https://github.com/python/mypy/commits/master
https://github.com/python/mypy/commits/main

For lists of contributors per mypy release (including typeshed) see
the release blog posts at https://mypy-lang.blogspot.com/.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ repo directly:
```bash
python3 -m pip install -U git+https://github.com/python/mypy.git
# or if you don't have 'git' installed
python3 -m pip install -U https://github.com/python/mypy/zipball/master
python3 -m pip install -U https://github.com/python/mypy/zipball/main
```

Now you can type-check the [statically typed parts] of a program like this:
Expand Down
10 changes: 5 additions & 5 deletions docs/source/additional_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Your CI script might work like this:

* Create a tarball from the ``.mypy_cache`` directory.

* Determine the current git master branch commit id (say, using
* Determine the current git main branch commit id (say, using
``git rev-parse HEAD``).

* Upload the tarball to the shared repository with a name derived from the
Expand All @@ -278,13 +278,13 @@ populates the local ``.mypy_cache`` directory from the shared
repository and then runs a normal incremental build.

The wrapper script needs some logic to determine the most recent
central repository commit (by convention, the ``origin/master`` branch
central repository commit (by convention, the ``origin/main`` branch
for git) the local development branch is based on. In a typical git
setup you can do it like this:

.. code::

git merge-base HEAD origin/master
git merge-base HEAD origin/main

The next step is to download the cache data (contents of the
``.mypy_cache`` directory) from the shared repository based on the
Expand Down Expand Up @@ -331,11 +331,11 @@ at least if your codebase is hundreds of thousands of lines or more:
potentially large number of changes in an incremental build, as this can
be much slower than downloading cache data and restarting the daemon.

* If the current local branch is based on a very recent master commit,
* If the current local branch is based on a very recent main commit,
the remote cache data may not yet be available for that commit, as
there will necessarily be some latency to build the cache files. It
may be a good idea to look for cache data for, say, the 5 latest
master commits and use the most recent data that is available.
main commits and use the most recent data that is available.

* If the remote cache is not accessible for some reason (say, from a public
network), the script can still fall back to a normal incremental build.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

html_theme_options = {
"source_repository": "https://github.com/python/mypy",
"source_branch": "master",
"source_branch": "main",
"source_directory": "docs/source",
}

Expand Down
4 changes: 2 additions & 2 deletions docs/source/extending_mypy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ can be specified after colon:

In the following sections we describe the basics of the plugin system with
some examples. For more technical details, please read the docstrings in
`mypy/plugin.py <https://github.com/python/mypy/blob/master/mypy/plugin.py>`_
`mypy/plugin.py <https://github.com/python/mypy/blob/main/mypy/plugin.py>`_
in mypy source code. Also you can find good examples in the bundled plugins
located in `mypy/plugins <https://github.com/python/mypy/tree/master/mypy/plugins>`_.
located in `mypy/plugins <https://github.com/python/mypy/tree/main/mypy/plugins>`_.

High-level overview
*******************
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. Mypy documentation master file, created by
.. Mypy documentation main file, created by
sphinx-quickstart on Sun Sep 14 19:50:35 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Expand Down
2 changes: 1 addition & 1 deletion misc/generate_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def filter_omitted_commits(commits: list[CommitInfo]) -> list[CommitInfo]:
def normalize_title(title: str) -> str:
# We sometimes add a title prefix when cherry-picking commits to a
# release branch. Attempt to remove these prefixes so that we can
# match them to the corresponding master branch.
# match them to the corresponding main branch.
if m := re.match(r"\[release [0-9.]+\] *", title, flags=re.I):
title = title.replace(m.group(0), "")
return title
Expand Down
2 changes: 1 addition & 1 deletion misc/perf_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Simple usage:

python misc/perf_compare.py my-branch master ...
python misc/perf_compare.py my-branch main ...

What this does:

Expand Down
11 changes: 3 additions & 8 deletions misc/sync-typeshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->

with requests.post(
"https://api.github.com/repos/python/mypy/pulls",
json={
"title": title,
"body": body,
"head": f"{fork_owner}:{branch_name}",
"base": "master",
},
json={"title": title, "body": body, "head": f"{fork_owner}:{branch_name}", "base": "main"},
headers=get_github_api_headers(),
) as response:
resp_json = response.json()
Expand All @@ -108,7 +103,7 @@ def create_or_update_pull_request(*, title: str, body: str, branch_name: str) ->
# Find the existing PR
with requests.get(
"https://api.github.com/repos/python/mypy/pulls",
params={"state": "open", "head": f"{fork_owner}:{branch_name}", "base": "master"},
params={"state": "open", "head": f"{fork_owner}:{branch_name}", "base": "main"},
headers=get_github_api_headers(),
) as response:
response.raise_for_status()
Expand Down Expand Up @@ -158,7 +153,7 @@ def main() -> None:
shutil.copytree(typeshed_patches, tmp_patches)

branch_name = "mypybot/sync-typeshed"
subprocess.run(["git", "checkout", "-B", branch_name, "origin/master"], check=True)
subprocess.run(["git", "checkout", "-B", branch_name, "origin/main"], check=True)

# Copy the stashed patches back
shutil.rmtree(typeshed_patches, ignore_errors=True)
Expand Down
2 changes: 1 addition & 1 deletion misc/trigger_wheel_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ cd build
echo $COMMIT > mypy_commit
git commit -am "Build wheels for mypy $V"
git tag v$V
# Push a tag, but no need to push the change to master
# Push a tag, but no need to push the change to main
git push --tags
4 changes: 2 additions & 2 deletions mypy/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ def report_internal_error(
# Print "INTERNAL ERROR" message.
print(
f"{prefix}error: INTERNAL ERROR --",
"Please try using mypy master on GitHub:\n"
"Please try using mypy main on GitHub:\n"
"https://mypy.readthedocs.io/en/stable/common_issues.html"
"#using-a-development-mypy-build",
file=stderr,
Expand All @@ -1270,7 +1270,7 @@ def report_internal_error(
print("Please report a bug at https://github.com/python/mypy/issues", file=stderr)
else:
print(
"If this issue continues with mypy master, "
"If this issue continues with mypy main, "
"please report a bug at https://github.com/python/mypy/issues",
file=stderr,
)
Expand Down
2 changes: 1 addition & 1 deletion mypyc/doc/dev-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ features.
## Development Environment

First you should set up the mypy development environment as described in
the [mypy docs](https://github.com/python/mypy/blob/master/README.md).
the [mypy docs](https://github.com/python/mypy/blob/main/README.md).
macOS, Linux and Windows are supported.

## Compiling and Running Programs
Expand Down
2 changes: 1 addition & 1 deletion mypyc/doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. mypyc documentation master file, created by
.. mypyc documentation main file, created by
sphinx-quickstart on Sun Apr 5 14:01:55 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def run(self):
project_urls={
"Documentation": "https://mypy.readthedocs.io/en/stable/index.html",
"Repository": "https://github.com/python/mypy",
"Changelog": "https://github.com/python/mypy/blob/master/CHANGELOG.md",
"Changelog": "https://github.com/python/mypy/blob/main/CHANGELOG.md",
"Issues": "https://github.com/python/mypy/issues",
},
)
Loading