Skip to content

Commit

Permalink
Fix some code-quality warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
devsli committed Aug 31, 2017
1 parent 1d66e57 commit 064fd0c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: python
python:
- "2.7"
- "3.6"
install:
- pip install coveralls
- pip install -e '.[test]'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Spreenauten GmbH
Copyright (c) 2016-2017 Spreenauten GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def run(self):
long_description=long_description,
url='https://github.com/spreecode/python-sofort',
author='Leonid Suprun',
author_email='mr.slay@gmail.com',
author_email='leonid@suprun.pw',
license='MIT',

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand All @@ -71,7 +71,9 @@ def run(self):
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7'
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],

# What does your project relate to?
Expand Down
4 changes: 2 additions & 2 deletions sofort/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Please, do not bump version above 0.x.x until it's open-sourced
__version__ = '0.4.1'
# Please, do not bump version above 0.x.x until it's finally awesome
__version__ = '0.4.2'
8 changes: 4 additions & 4 deletions sofort/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ def response(xmlstr):


class ForcedListType(ListType):
def to_native(self, value):
return [self.field.to_native(item) for item in as_list(value)]
def to_native(self, value, **kwargs):
return [self.field.to_native(item, **kwargs) for item in as_list(value)]


class SofortListType(ForcedListType):
def __init__(self, field_name='', *args, **kwargs):
ForcedListType.__init__(self, *args, **kwargs)
self.field_name = field_name

def to_native(self, value):
return ForcedListType.to_native(self, value[self.field_name])
def to_native(self, value, **kwargs):
return ForcedListType.to_native(self, value[self.field_name], **kwargs)


class Iso8601DateTimeType(DateTimeType):
Expand Down

0 comments on commit 064fd0c

Please sign in to comment.