summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2021-10-24 14:25:24 -0700
committerGitHub <noreply@github.com>2021-10-24 17:25:24 -0400
commit73ae7545dba0a466df8eb793e3d434de4b2415ca (patch)
tree2ada66e654bbbc51d25ee47d4e223cfd8c786ed2
parent7349e9c697a13f98bb42126eac3bfc0118cc3d47 (diff)
downloadnetworkx-73ae7545dba0a466df8eb793e3d434de4b2415ca.tar.gz
Add pyupgrade to pre-commit (#5146)
-rw-r--r--.pre-commit-config.yaml5
-rw-r--r--requirements/developer.txt1
-rw-r--r--setup.py2
3 files changed, 7 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index c02635bd..e7fadca7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,3 +6,8 @@ repos:
rev: 21.5b1
hooks:
- id: black
+- repo: https://github.com/asottile/pyupgrade
+ rev: v2.29.0
+ hooks:
+ - id: pyupgrade
+ args: [--py38-plus]
diff --git a/requirements/developer.txt b/requirements/developer.txt
index efc4154b..24186239 100644
--- a/requirements/developer.txt
+++ b/requirements/developer.txt
@@ -1,2 +1,3 @@
black==21.5b1
+pyupgrade>=2.29.0
pre-commit>=2.12
diff --git a/setup.py b/setup.py
index cd15dd81..74a8ce86 100644
--- a/setup.py
+++ b/setup.py
@@ -167,7 +167,7 @@ extras_require = {
for dep in ["default", "developer", "doc", "extra", "test"]
}
-with open("README.rst", "r") as fh:
+with open("README.rst") as fh:
long_description = fh.read()
if __name__ == "__main__":