Skip to content

Commit

Permalink
Fix SyntaxError in gmail_oauth2 (#873)
Browse files Browse the repository at this point in the history
* fix dep specs

* fix SyntaxError in gmail_oauth2

SyntaxError: from __future__ imports must occur at the beginning of the file
  • Loading branch information
chrispyles authored Oct 26, 2024
1 parent 35ea250 commit 7d3c6f5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**v6.0.1 (unreleased):**

* Updated dependency specifications to support any new minor version within the matching major version
* Fixed `SyntaxError` thrown by `gmail_oauth2` binary

**v6.0.0:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
a AUTHENTICATE XOAUTH2 a9sha9sfs[...]9dfja929dk==
"""

from __future__ import print_function

import base64
import imaplib
import json
Expand All @@ -68,7 +70,6 @@
import sys
import urllib

from __future__ import print_function
from optparse import OptionParser


Expand Down Expand Up @@ -357,3 +358,7 @@ def main():
options_parser.print_help()
print("Nothing to do, exiting.")
return


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extend-exclude = """
py_version = "39"
skip_glob = ["test/**/files/*"]
line_length = 100
sections = ["THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
sections = ["FUTURE", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
multi_line_output = 3
use_parentheses = true
order_by_type = false
Expand Down
22 changes: 22 additions & 0 deletions test/test_conda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""Tests that issues encountered in conda-forge builds don't recur."""

import subprocess
import sys


def test_otter_bin():
"""Tests that the ``otter`` binary works."""
subprocess.run([sys.executable, "-m", "otter", "--help"], check=True)


def test_gmail_oauth2_bin():
"""Tests that the ``gmail_oauth2`` binary works."""
res = subprocess.run(
[
sys.executable,
"-m",
"otter.plugins.builtin.gmail_notifications.bin.gmail_oauth2",
"--help",
],
check=True,
)

0 comments on commit 7d3c6f5

Please sign in to comment.