Skip to content

Commit

Permalink
Merge pull request #212 from Zyzyx/main
Browse files Browse the repository at this point in the history
remove legacy mock and py2 support
  • Loading branch information
Zyzyx authored Oct 2, 2024
2 parents 40327d3 + 923d4bd commit f6c88df
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 42 deletions.
9 changes: 1 addition & 8 deletions sync2jira/upstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@
# Authors: Ralph Bean <[email protected]>

import logging

try:
from urllib.parse import urlencode # py3
string_type = str
except ImportError:
from urllib import urlencode # py2
import types
string_type = types.StringTypes
from urllib.parse import urlencode

import requests
from github import Github
Expand Down
3 changes: 1 addition & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
python-coveralls
coverage
pytest
pytest-cov
mock
python-coveralls
8 changes: 2 additions & 6 deletions tests/test_downstream_issue.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import mock
import unittest
try:
# Python 3.3 >
from unittest.mock import MagicMock # noqa: F401
except ImportError:
from mock import MagicMock # noqa: F401
import unittest.mock as mock
from unittest.mock import MagicMock
from datetime import datetime

import sync2jira.downstream_issue as d
Expand Down
8 changes: 2 additions & 6 deletions tests/test_downstream_pr.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import unittest
import mock
try:
# Python 3.3 >
from unittest.mock import MagicMock # noqa: F401
except ImportError:
from mock import MagicMock # noqa: F401
import unittest.mock as mock
from unittest.mock import MagicMock

import sync2jira.downstream_pr as d

Expand Down
8 changes: 2 additions & 6 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import mock
import unittest
try:
# Python 3.3 >
from unittest.mock import MagicMock # noqa: F401
except ImportError:
from mock import MagicMock # noqa: F401
import unittest.mock as mock
from unittest.mock import MagicMock

import sync2jira.main as m

Expand Down
9 changes: 2 additions & 7 deletions tests/test_upstream_issue.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import mock
import unittest
try:
# Python 3.3 >
from unittest.mock import MagicMock # noqa: F401
except ImportError:
from mock import MagicMock # noqa: F401

import unittest.mock as mock
from unittest.mock import MagicMock

import sync2jira.upstream_issue as u

Expand Down
9 changes: 2 additions & 7 deletions tests/test_upstream_pr.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import mock
import unittest
try:
# Python 3.3 >
from unittest.mock import MagicMock # noqa: F401
except ImportError:
from mock import MagicMock # noqa: F401

import unittest.mock as mock
from unittest.mock import MagicMock

import sync2jira.upstream_pr as u

Expand Down

0 comments on commit f6c88df

Please sign in to comment.