General flake8 compliance

parent a347bb7c288d
......@@ -4,4 +4,6 @@ sys.modules['datetime'] = mock_dt
import mock_time
sys.modules['time'] = mock_time
from . import sqlite3
# registering sqlite3 adapter/converters
from . import sqlite3 # noqa
from datetime import *
# The current module will entirely substitute datetime, hence:
from datetime import * # noqa
from datetime import datetime as original_datetime
class ReplacementSubclassMeta(type):
"""A metaclass for classes that subclass a given one to replace it.
......@@ -60,4 +62,3 @@ class datetime(original_datetime):
of 'now'.
"""
cls.set_now(None)
......@@ -5,11 +5,12 @@ but not in subsequent imports from other modules.
Replacing the whole time module by this one does work.
"""
from time import *
from time import * # noqa
from time import time as original_time
from datetime import datetime
def time():
if datetime._current_now is None:
return original_time()
......
......@@ -34,6 +34,7 @@ from mock_dt import original_datetime
from _sqlite3 import register_adapter
def adapt_datetime(val):
return val.isoformat(" ")
......
......@@ -3,11 +3,12 @@ from setuptools import setup, find_packages
version = '0.4'
setup(
name = "anybox.testing.datetime",
version = version,
name="anybox.testing.datetime",
version=version,
author="Georges Racinet",
author_email="gracinet@anybox.fr",
description="Various utilities related to date and time for testing purposes.",
description="Various utilities related to date and time for testing "
"purposes.",
license="GPLv3+",
long_description=open('README.txt').read() + open('CHANGES.txt').read(),
url="https://bitbucket.org/anybox/anybox.testing.datetime",
......@@ -15,12 +16,11 @@ setup(
zip_safe=False,
include_package_data=True,
namespace_packages=['anybox', 'anybox.testing'],
install_requires=['setuptools',],
install_requires=['setuptools'],
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: OSI Approved :: "
"GNU General Public License v3 or later (GPLv3+)",
"Topic :: Software Development :: Testing",
],
entry_points = {},
)
],
entry_points={},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment