Skip to content

Commit 4be4848

Browse files
authored
Merge pull request #14 from vmalloc/ayalas/improvments
Ayalas/improvments
2 parents 6ab276d + 5d0da16 commit 4be4848

15 files changed

Lines changed: 84 additions & 65 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.pyc
22
.vagrant
33
*.egg-info
4+
.eggs
45
build
56
.tox
67
flycheck-*

.pylintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[MESSAGES CONTROL]
2+
disable= R,attribute-defined-outside-init,bad-continuation,bad-option-value,bare-except,invalid-name,locally-disabled,missing-docstring,redefined-builtin,ungrouped-imports,wrong-import-order,wrong-import-position,unnecessary-pass,global-statement
3+
4+
[REPORTS]
5+
reports=no
6+
7+
[FORMAT]
8+
max-line-length=150

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
default: test
22

33
test: env
4-
.env/bin/py.test tests
4+
.env/bin/pytest tests
5+
.env/bin/pylint --rcfile .pylintrc flask_loopback tests setup.py
56

67
env: .env/.up-to-date
78

89
.env/.up-to-date: setup.py Makefile
910
python -m virtualenv .env
10-
.env/bin/pip install -e .
11-
.env/bin/pip install pytest
11+
.env/bin/pip install -e ".[testing]"
1212
touch $@
13-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Build Status] (https://secure.travis-ci.org/vmalloc/Flask-Loopback.png )   ![Version] (https://img.shields.io/pypi/v/Flask-Loopback.svg )
1+
![Build Status](https://secure.travis-ci.org/vmalloc/Flask-Loopback.png)   ![Version](https://img.shields.io/pypi/v/Flask-Loopback.svg)
22

33
Overview
44
========

flask_loopback/__version__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
__version__ = "1.4.7"
1+
import pkg_resources
2+
3+
__version__ = pkg_resources.get_distribution('Flask-Loopback').version

flask_loopback/_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=import-error,unused-import
12
from contextlib import contextmanager
23
import gzip
34
import sys

flask_loopback/flask_loopback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def handle_request(self, session, url, request):
7777
return e.response
7878

7979
self._test_client.cookie_jar.clear()
80-
for cookie in request._cookies:
80+
for cookie in request._cookies: # pylint: disable=protected-access
8181
self._test_client.cookie_jar.set_cookie(cookie)
8282
resp = self._test_client.open(path, **open_kwargs)
8383
returned = requests.Response()

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
requests
2+
Flask
3+
URLObject
4+
5+
unittest2; python_version<'2.7'
6+
contextlib2; python_version<'3.3'

setup.cfg

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[metadata]
2+
name = Flask-Loopback
3+
classifiers =
4+
Programming Language :: Python :: 2.7
5+
Programming Language :: Python :: 3.5
6+
Programming Language :: Python :: 3.6
7+
Programming Language :: Python :: 3.7
8+
summary = Library for faking HTTP requests using flask applications without actual network operations
9+
description-file =
10+
README.md
11+
description-content-type = text/markdown
12+
license = BSD3
13+
author = Rotem Yaari
14+
author_email = vmalloc@gmail.com
15+
url = https://github.com/vmalloc/flask-loopback
16+
17+
[extras]
18+
testing =
19+
pytest
20+
astroid~=1.5.3; python_version=='2.7'
21+
astroid>=2.0; python_version >= '3.4'
22+
pylint~=1.7.2; python_version=='2.7'
23+
pylint~=2.3.1; python_version >= '3.4'
24+
25+
[tool:pytest]
26+
testpaths = tests

setup.py

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,9 @@
1-
import os
2-
import sys
3-
from setuptools import setup, find_packages
1+
#!/usr/bin/env python
2+
from setuptools import setup
43

5-
with open(os.path.join(os.path.dirname(__file__), "flask_loopback", "__version__.py")) as version_file:
6-
exec(version_file.read()) # pylint: disable=W0122
74

8-
_INSTALL_REQUIERS = [
9-
"requests",
10-
"Flask",
11-
"URLObject",
12-
]
13-
14-
if sys.version_info < (2, 7):
15-
_INSTALL_REQUIERS.append("unittest2")
16-
17-
if sys.version_info < (3, 3):
18-
_INSTALL_REQUIERS.append("contextlib2")
19-
20-
setup(name="Flask-Loopback",
21-
classifiers = [
22-
"Programming Language :: Python :: 2.6",
23-
"Programming Language :: Python :: 2.7",
24-
"Programming Language :: Python :: 3.3",
25-
],
26-
description="Library for faking HTTP requests using flask applications without actual network operations",
27-
license="BSD3",
28-
author="Rotem Yaari",
29-
author_email="vmalloc@gmail.com",
30-
version=__version__, # pylint: disable=E0602
31-
packages=find_packages(exclude=["tests"]),
32-
33-
url="https://github.com/vmalloc/flask-loopback",
34-
35-
install_requires=_INSTALL_REQUIERS,
36-
scripts=[],
37-
namespace_packages=[]
38-
)
5+
setup(
6+
setup_requires=['pbr>=3.0', 'setuptools>=17.1'],
7+
pbr=True,
8+
long_description_content_type='text/markdown; charset=UTF-8',
9+
)

0 commit comments

Comments
 (0)