Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
lrosemberg committed Dec 12, 2024
1 parent 84e81f1 commit 363e3db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions roboflow/core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,10 +823,9 @@ def __download_zip(self, link, location, format):
def bar_progress(current, total, width=80):
progress_message = (
"Downloading Dataset Version Zip in "
+ location
+ " to "
+ format
+ ": %d%% [%d / %d] bytes" % (current / total * 100, current, total)
f"{location} to "
f"{format}: "
f"{current/total*100:.0f}% [{current} / {total}] bytes"
)
sys.stdout.write("\r" + progress_message)
sys.stdout.flush()
Expand Down
3 changes: 1 addition & 2 deletions roboflow/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ def is_valid_ISO8601_timestamp(ts):
try:
datetime.fromisoformat(ts)
return True
except:
except: # noqa: E722
return False


def check_from_to_timestamp(from_timestamp, to_timestamp, default_timedelta):
if from_timestamp and not is_valid_ISO8601_timestamp(from_timestamp):
print("Please provide a valid from_timestamp in ISO8601 format (YYYY-MM-DD HH:MM:SS)")
Expand Down

0 comments on commit 363e3db

Please sign in to comment.