diff --git a/.editorconfig b/.editorconfig index 19fa9dfa..be51087f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,6 @@ trim_trailing_whitespace = true indent_style = space indent_size = 2 insert_final_newline = true + +[*.py] +indent_size = 4 diff --git a/src/pypi.py b/src/pypi.py index 4543d3db..4b606a7b 100644 --- a/src/pypi.py +++ b/src/pypi.py @@ -32,7 +32,7 @@ def fetch_releases(pypi_id, regex): for r in regex: if re.match(r, version): matches = True - if matches: + if matches and R: d = datetime.fromisoformat(R[0]["upload_time"]).strftime("%Y-%m-%d") releases[version] = d print("%s: %s" % (version, d))