Skip to content

Commit

Permalink
#225: rename the variable in __about__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kmyk committed Jan 2, 2019
1 parent 1c9f521 commit 70346d1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion onlinejudge/__about__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python Version: 3.x
name = 'online-judge-tools'
__package_name__ = 'online-judge-tools'
__author__ = 'Kimiyuki Onaka'
__email__ = '[email protected]'
__license__ = 'MIT License'
Expand Down
2 changes: 1 addition & 1 deletion onlinejudge/implementation/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def version_check() -> None:
if utils.is_update_available_on_pypi():
log.warning('update available: %s -> %s', version.__version__, utils.get_latest_version_from_pypi())
log.info('run: $ pip3 install -U %s', version.name)
log.info('run: $ pip3 install -U %s', version.__package_name__)


def get_parser() -> argparse.ArgumentParser:
Expand Down
8 changes: 4 additions & 4 deletions onlinejudge/implementation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
from typing import *
from typing.io import *

config_dir = pathlib.Path(appdirs.user_config_dir(version.name))
data_dir = pathlib.Path(appdirs.user_data_dir(version.name))
cache_dir = pathlib.Path(appdirs.user_cache_dir(version.name))
config_dir = pathlib.Path(appdirs.user_config_dir(version.__package_name__))
data_dir = pathlib.Path(appdirs.user_data_dir(version.__package_name__))
cache_dir = pathlib.Path(appdirs.user_cache_dir(version.__package_name__))
html_parser = 'lxml'

def parcentformat(s: str, table: Dict[str, str]) -> str:
Expand Down Expand Up @@ -190,7 +190,7 @@ def request(method: str, url: str, session: requests.Session, raise_for_status:


def get_latest_version_from_pypi() -> str:
pypi_url = 'https://pypi.org/pypi/{}/json'.format(version.name)
pypi_url = 'https://pypi.org/pypi/{}/json'.format(version.__package_name__)
version_cache_path = cache_dir / "pypi.json"
update_interval = 60 * 60 * 8 # 8 hours

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def load_module(module_path):
readme = fh.read()

setup(
name=version.name,
name=version.__package_name__,
version=version.__version__,
description='Tools for online-judge services',
install_requires=[
Expand Down

0 comments on commit 70346d1

Please sign in to comment.