Skip to content

Commit

Permalink
Modify to use Python 3.6 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Oct 7, 2023
1 parent 4ce01c7 commit c53146f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


MODULE_NAME = "tblfaker"
REPOSITORY_URL = "https://github.com/thombashi/{:s}".format(MODULE_NAME)
REPOSITORY_URL = f"https://github.com/thombashi/{MODULE_NAME:s}"
REQUIREMENT_DIR = "requirements"
ENCODING = "utf8"

Expand Down Expand Up @@ -47,7 +47,10 @@ def get_release_command_class() -> Dict[str, setuptools.Command]:
long_description_content_type="text/x-rst",
packages=setuptools.find_packages(exclude=["test*"]),
package_data={MODULE_NAME: ["py.typed"]},
project_urls={"Source": REPOSITORY_URL, "Tracker": "{:s}/issues".format(REPOSITORY_URL)},
project_urls={
"Source": REPOSITORY_URL,
"Tracker": f"{REPOSITORY_URL:s}/issues",
},
python_requires=">=3.8",
install_requires=INSTALL_REQUIRES,
extras_require={"test": TESTS_REQUIRES},
Expand Down
2 changes: 1 addition & 1 deletion tblfaker/__version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright 2018, {}".format(__author__)
__copyright__ = f"Copyright 2018, {__author__}"
__license__ = "MIT License"
__version__ = "0.2.4"
__maintainer__ = __author__
Expand Down
2 changes: 1 addition & 1 deletion tblfaker/_tblfaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def __validate_provider(providers: Sequence[str]) -> None:
diff = set(providers) - get_providers()

if diff:
raise ValueError("unknown providers found: {}".format(diff))
raise ValueError(f"unknown providers found: {diff}")
4 changes: 2 additions & 2 deletions test/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@


def print_test_result(expected, actual, error=None):
print("[expected]\n{}\n".format(expected))
print("[actual]\n{}\n".format(actual))
print(f"[expected]\n{expected}\n")
print(f"[actual]\n{actual}\n")

if error:
print(error, file=sys.stderr)

0 comments on commit c53146f

Please sign in to comment.