Skip to content

Commit

Permalink
pyupgrade @ 3.7
Browse files Browse the repository at this point in the history
pip install pyupgrade autoflake; \
pyupgrade --py37 tests/**/*.py docs/**/*.py unihan_db/**/*.py; \
poetry run autoflake tests/**/*.py docs/**/*.py unihan_db/**/*.py -i --ignore-init-module-imports --exclude unihan_db/_compat.py; \
make black isort
  • Loading branch information
tony committed Mar 6, 2022
1 parent 07dd3e0 commit 00e5b34
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
latex_documents = [
(
"index",
"{0}.tex".format(about["__package_name__"]),
"{0} Documentation".format(about["__title__"]),
"{}.tex".format(about["__package_name__"]),
"{} Documentation".format(about["__title__"]),
about["__author__"],
"manual",
)
Expand All @@ -100,7 +100,7 @@
(
"index",
about["__package_name__"],
"{0} Documentation".format(about["__title__"]),
"{} Documentation".format(about["__title__"]),
about["__author__"],
1,
)
Expand All @@ -109,8 +109,8 @@
texinfo_documents = [
(
"index",
"{0}".format(about["__package_name__"]),
"{0} Documentation".format(about["__title__"]),
"{}".format(about["__package_name__"]),
"{} Documentation".format(about["__title__"]),
about["__author__"],
about["__package_name__"],
about["__description__"],
Expand Down
2 changes: 0 additions & 2 deletions tests/test_bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf8 - *-

from unihan_db import bootstrap
from unihan_db.tables import Base, Unhn

Expand Down
2 changes: 0 additions & 2 deletions unihan_db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf8 - *-

import os

from appdirs import AppDirs
Expand Down
1 change: 0 additions & 1 deletion unihan_db/_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf8 -*-
# flake8: NOQA
import sys

Expand Down
2 changes: 1 addition & 1 deletion unihan_db/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def is_bootstrapped(metadata):
if TABLE_NAME in metadata.tables.keys():
table = metadata.tables[TABLE_NAME]

if set(fields) == set(c.name for c in table.columns):
if set(fields) == {c.name for c in table.columns}:
return True
else:
return False
Expand Down

0 comments on commit 00e5b34

Please sign in to comment.