From 66505f8f41421c6cf02a5cff9ec2e34ecae557d6 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 28 Aug 2019 21:57:46 +0200 Subject: [PATCH] Remove redundant encoding specifiers and __future__ imports --- docs/conf.py | 2 -- examples/basic_usage.py | 2 -- examples/echobot.py | 2 -- examples/fetch.py | 2 -- examples/interract.py | 2 -- examples/keepbot.py | 2 -- examples/removebot.py | 2 -- fbchat/__init__.py | 2 -- fbchat/_attachment.py | 3 --- fbchat/_client.py | 3 --- fbchat/_core.py | 3 --- fbchat/_exception.py | 4 ---- fbchat/_file.py | 3 --- fbchat/_graphql.py | 3 --- fbchat/_group.py | 3 --- fbchat/_location.py | 3 --- fbchat/_message.py | 3 --- fbchat/_page.py | 3 --- fbchat/_plan.py | 3 --- fbchat/_poll.py | 3 --- fbchat/_quick_reply.py | 3 --- fbchat/_state.py | 3 --- fbchat/_sticker.py | 3 --- fbchat/_thread.py | 3 --- fbchat/_user.py | 3 --- fbchat/_util.py | 3 --- fbchat/models.py | 2 -- tests/conftest.py | 4 ---- tests/test_base.py | 4 ---- tests/test_fetch.py | 4 ---- tests/test_message_management.py | 4 ---- tests/test_plans.py | 4 ---- tests/test_polls.py | 4 ---- tests/test_search.py | 4 ---- tests/test_send.py | 4 ---- tests/test_tests.py | 4 ---- tests/test_thread_interraction.py | 4 ---- tests/utils.py | 4 ---- 38 files changed, 117 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0e5309d..4f95bb1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a diff --git a/examples/basic_usage.py b/examples/basic_usage.py index c712dcd..b64f30e 100644 --- a/examples/basic_usage.py +++ b/examples/basic_usage.py @@ -1,5 +1,3 @@ -# -*- coding: UTF-8 -*- - from fbchat import Client from fbchat.models import * diff --git a/examples/echobot.py b/examples/echobot.py index d03159e..ac1e6ab 100644 --- a/examples/echobot.py +++ b/examples/echobot.py @@ -1,5 +1,3 @@ -# -*- coding: UTF-8 -*- - from fbchat import log, Client # Subclass fbchat.Client and override required methods diff --git a/examples/fetch.py b/examples/fetch.py index cbcef40..f18c048 100644 --- a/examples/fetch.py +++ b/examples/fetch.py @@ -1,5 +1,3 @@ -# -*- coding: UTF-8 -*- - from itertools import islice from fbchat import Client from fbchat.models import * diff --git a/examples/interract.py b/examples/interract.py index 12dc21e..f40f1ca 100644 --- a/examples/interract.py +++ b/examples/interract.py @@ -1,5 +1,3 @@ -# -*- coding: UTF-8 -*- - from fbchat import Client from fbchat.models import * diff --git a/examples/keepbot.py b/examples/keepbot.py index b3e835e..73a213c 100644 --- a/examples/keepbot.py +++ b/examples/keepbot.py @@ -1,5 +1,3 @@ -# -*- coding: UTF-8 -*- - from fbchat import log, Client from fbchat.models import * diff --git a/examples/removebot.py b/examples/removebot.py index 91979ff..8b1a941 100644 --- a/examples/removebot.py +++ b/examples/removebot.py @@ -1,5 +1,3 @@ -# -*- coding: UTF-8 -*- - from fbchat import log, Client from fbchat.models import * diff --git a/fbchat/__init__.py b/fbchat/__init__.py index fa53c73..fa58ba9 100644 --- a/fbchat/__init__.py +++ b/fbchat/__init__.py @@ -1,10 +1,8 @@ -# -*- coding: UTF-8 -*- """Facebook Chat (Messenger) for Python :copyright: (c) 2015 - 2019 by Taehoon Kim :license: BSD 3-Clause, see LICENSE for more details. """ -from __future__ import unicode_literals # These imports are far too general, but they're needed for backwards compatbility. from .models import * diff --git a/fbchat/_attachment.py b/fbchat/_attachment.py index 8ce3296..24dc17b 100644 --- a/fbchat/_attachment.py +++ b/fbchat/_attachment.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from . import _util diff --git a/fbchat/_client.py b/fbchat/_client.py index 23a7916..3d009e0 100644 --- a/fbchat/_client.py +++ b/fbchat/_client.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import requests import urllib from uuid import uuid1 diff --git a/fbchat/_core.py b/fbchat/_core.py index e7d86b4..e6df0aa 100644 --- a/fbchat/_core.py +++ b/fbchat/_core.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import logging import aenum diff --git a/fbchat/_exception.py b/fbchat/_exception.py index e49537c..c28d68b 100644 --- a/fbchat/_exception.py +++ b/fbchat/_exception.py @@ -1,7 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - - class FBchatException(Exception): """Custom exception thrown by ``fbchat``. diff --git a/fbchat/_file.py b/fbchat/_file.py index 40ab04d..db3ebf1 100644 --- a/fbchat/_file.py +++ b/fbchat/_file.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from ._attachment import Attachment diff --git a/fbchat/_graphql.py b/fbchat/_graphql.py index 375f307..9a186ec 100644 --- a/fbchat/_graphql.py +++ b/fbchat/_graphql.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import json import re from . import _util diff --git a/fbchat/_group.py b/fbchat/_group.py index 1d7b584..e4af880 100644 --- a/fbchat/_group.py +++ b/fbchat/_group.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from . import _plan from ._thread import ThreadType, Thread diff --git a/fbchat/_location.py b/fbchat/_location.py index e3cc566..a3dc829 100644 --- a/fbchat/_location.py +++ b/fbchat/_location.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from ._attachment import Attachment from . import _util diff --git a/fbchat/_message.py b/fbchat/_message.py index f2d3a8c..60a52c5 100644 --- a/fbchat/_message.py +++ b/fbchat/_message.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr import json from string import Formatter diff --git a/fbchat/_page.py b/fbchat/_page.py index 7721cf2..76bbad7 100644 --- a/fbchat/_page.py +++ b/fbchat/_page.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from . import _plan from ._thread import ThreadType, Thread diff --git a/fbchat/_plan.py b/fbchat/_plan.py index bc4cd47..d0dc576 100644 --- a/fbchat/_plan.py +++ b/fbchat/_plan.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr import json from ._core import Enum diff --git a/fbchat/_poll.py b/fbchat/_poll.py index b5944b9..554d91e 100644 --- a/fbchat/_poll.py +++ b/fbchat/_poll.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr diff --git a/fbchat/_quick_reply.py b/fbchat/_quick_reply.py index 1163edc..147632d 100644 --- a/fbchat/_quick_reply.py +++ b/fbchat/_quick_reply.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from ._attachment import Attachment diff --git a/fbchat/_state.py b/fbchat/_state.py index a20e4f2..ed7b3f2 100644 --- a/fbchat/_state.py +++ b/fbchat/_state.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr import bs4 import re diff --git a/fbchat/_sticker.py b/fbchat/_sticker.py index 024132d..a56ce2a 100644 --- a/fbchat/_sticker.py +++ b/fbchat/_sticker.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from ._attachment import Attachment diff --git a/fbchat/_thread.py b/fbchat/_thread.py index a93a178..c3f4ab6 100644 --- a/fbchat/_thread.py +++ b/fbchat/_thread.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from ._core import Enum diff --git a/fbchat/_user.py b/fbchat/_user.py index eae5fdb..af70dbb 100644 --- a/fbchat/_user.py +++ b/fbchat/_user.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- -from __future__ import unicode_literals - import attr from ._core import Enum from . import _plan diff --git a/fbchat/_util.py b/fbchat/_util.py index 5123590..cb8a677 100644 --- a/fbchat/_util.py +++ b/fbchat/_util.py @@ -1,6 +1,3 @@ -# -*- coding: UTF-8 -*- - -from __future__ import unicode_literals import re import json from time import time diff --git a/fbchat/models.py b/fbchat/models.py index 1bab61b..69bfd84 100644 --- a/fbchat/models.py +++ b/fbchat/models.py @@ -1,11 +1,9 @@ -# -*- coding: UTF-8 -*- """This file is here to maintain backwards compatability, and to re-export our models into the global module (see `__init__.py`). A common pattern was to use `from fbchat.models import *`, hence we need this while transitioning to a better code structure. """ -from __future__ import unicode_literals from ._core import Enum from ._exception import FBchatException, FBchatFacebookError, FBchatUserError diff --git a/tests/conftest.py b/tests/conftest.py index 2e1f486..07d598b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest import json diff --git a/tests/test_base.py b/tests/test_base.py index 6a60482..16ab01c 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest import py_compile diff --git a/tests/test_fetch.py b/tests/test_fetch.py index d509fad..8515c3f 100644 --- a/tests/test_fetch.py +++ b/tests/test_fetch.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest from os import path diff --git a/tests/test_message_management.py b/tests/test_message_management.py index 00291ee..adde421 100644 --- a/tests/test_message_management.py +++ b/tests/test_message_management.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest from fbchat.models import Message, MessageReaction diff --git a/tests/test_plans.py b/tests/test_plans.py index 9e5e6b6..5388e6c 100644 --- a/tests/test_plans.py +++ b/tests/test_plans.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest from fbchat.models import Plan, FBchatFacebookError, ThreadType diff --git a/tests/test_polls.py b/tests/test_polls.py index 32c2457..daa6f1c 100644 --- a/tests/test_polls.py +++ b/tests/test_polls.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest from fbchat.models import Poll, PollOption, ThreadType diff --git a/tests/test_search.py b/tests/test_search.py index dda9568..07cc88e 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - from fbchat.models import ThreadType diff --git a/tests/test_send.py b/tests/test_send.py index b5dec30..c45be33 100644 --- a/tests/test_send.py +++ b/tests/test_send.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest from os import path diff --git a/tests/test_tests.py b/tests/test_tests.py index 1367628..2132f8f 100644 --- a/tests/test_tests.py +++ b/tests/test_tests.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest diff --git a/tests/test_thread_interraction.py b/tests/test_thread_interraction.py index 041346b..b809c6d 100644 --- a/tests/test_thread_interraction.py +++ b/tests/test_thread_interraction.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import pytest from fbchat.models import ( diff --git a/tests/utils.py b/tests/utils.py index 76bcf9e..21bed11 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import threading import logging import pytest