Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ dependencies:

test:
post:
- pylint singer -d missing-docstring,broad-except,bare-except,too-many-return-statements,too-many-branches,too-many-arguments,no-else-return,too-few-public-methods,fixme,protected-access
- pylint singer -d missing-docstring,broad-except,bare-except,too-many-return-statements,too-many-branches,too-many-arguments,no-else-return,too-few-public-methods,fixme,protected-access,too-many-locals,inconsistent-return-statements
3 changes: 1 addition & 2 deletions singer/transform.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import datetime
import pendulum
from jsonschema import RefResolver
from singer.logger import get_logger
from singer.utils import strftime

from jsonschema import RefResolver

LOGGER = get_logger()

NO_INTEGER_DATETIME_PARSING = "no-integer-datetime-parsing"
Expand Down
8 changes: 4 additions & 4 deletions singer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from singer.catalog import Catalog

DATETIME_PARSE = "%Y-%m-%dT%H:%M:%SZ"
DATETIME_FMT = "%Y-%m-%dT%H:%M:%S.%fZ"
DATETIME_FMT = "%04Y-%m-%dT%H:%M:%S.%fZ"

def now():
return datetime.datetime.utcnow().replace(tzinfo=pytz.UTC)
Expand Down Expand Up @@ -174,11 +174,11 @@ def exception_is_4xx(exception):
def handle_top_exception(logger):
"""A decorator that will catch exceptions and log the exception's message
as a CRITICAL log."""
def decorator(fn):
@functools.wraps(fn)
def decorator(fnc):
@functools.wraps(fnc)
def wrapped(*args, **kwargs):
try:
return fn(*args, **kwargs)
return fnc(*args, **kwargs)
except Exception as exc:
logger.critical(exc)
raise
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestFormat(unittest.TestCase):
def test_small_years(self):
self.assertEqual(u.strftime(dt(90, 1, 1, tzinfo=tz.utc), '%04Y-%m-%dT%H:%M:%S.%fZ'),
self.assertEqual(u.strftime(dt(90, 1, 1, tzinfo=tz.utc)),
"0090-01-01T00:00:00.000000Z")


Expand Down