Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Ying Chen committed Dec 6, 2023
1 parent 5277897 commit 91cf864
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/promptflow/promptflow/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ class AvailableIDE:

CLI_PACKAGE_NAME = 'promptflow'
VERSION_UPDATE_TIME = 'update_time'
PF_VERSION_CHECK = "pf_version_check.json"
PF_VERSION_CHECK = "pf_version_check.json"
1 change: 0 additions & 1 deletion src/promptflow/promptflow/_sdk/_telemetry/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from promptflow._utils.version_hint_utils import hint_for_update, HINT_ACTIVITY_NAME



class ActivityType(object):
"""The type of activity (code) monitored.
Expand Down
4 changes: 2 additions & 2 deletions src/promptflow/promptflow/_utils/version_hint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def _update_latest_from_pypi(versions):
versions['pypi'] = version
return versions, success


def get_latest_version_from_pypi(package_name):
try:
import requests
Expand Down Expand Up @@ -73,7 +74,6 @@ def hint_for_update():
except json.decoder.JSONDecodeError:
cached_versions = {}


version_update_time = datetime.datetime.strptime(
cached_versions[VERSION_UPDATE_TIME],
'%Y-%m-%d %H:%M:%S.%f'
Expand All @@ -90,4 +90,4 @@ def hint_for_update():
"if new prompt flow version is available manually.")
if is_updated:
with open(HOME_PROMPT_FLOW_DIR / PF_VERSION_CHECK, "w") as f:
json.dump(cached_versions, f)
json.dump(cached_versions, f)

0 comments on commit 91cf864

Please sign in to comment.