Skip to content

Commit 08613d7

Browse files
pre-commit
1 parent cd65de2 commit 08613d7

File tree

14 files changed

+384
-266
lines changed

14 files changed

+384
-266
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ python:
1212
env:
1313
- EDITABLE=-e
1414
- EDITABLE=
15-
install:
15+
install:
1616
- pip install -U setuptools pip setuptools_scm pytest
1717
- pip install $EDITABLE .
1818
# command to run tests

CHANGELOG

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,3 @@
7373

7474
- added special __onfirstaccess__ attribute whose value will
7575
be called on the first attribute access of an apimodule.
76-

LICENSE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
66
copies of the Software, and to permit persons to whom the Software is
77
furnished to do so, subject to the following conditions:
8-
8+
99
The above copyright notice and this permission notice shall be included in all
1010
copies or substantial portions of the Software.
11-
11+
1212
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1313
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1414
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1515
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1616
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1717
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1818
SOFTWARE.
19-

conftest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import py
2+
23
import apipkg
3-
LOCAL_APIPKG = py.path.local(__file__).dirpath().join('src/apipkg/__init__.py')
4-
INSTALL_TYPE = 'editable' if apipkg.__file__ == LOCAL_APIPKG else 'full'
4+
5+
LOCAL_APIPKG = py.path.local(__file__).dirpath().join("src/apipkg/__init__.py")
6+
INSTALL_TYPE = "editable" if apipkg.__file__ == LOCAL_APIPKG else "full"
57

68

79
def pytest_report_header(startdir):
810
return "apipkg {install_type} install version={version}".format(
9-
install_type=INSTALL_TYPE, version=apipkg.__version__)
11+
install_type=INSTALL_TYPE, version=apipkg.__version__
12+
)

example/_mypkg/othermodule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
class OtherClass:
32
pass

example/_mypkg/somemodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
from _mypkg.othermodule import OtherClass # NOQA: F401
12

2-
from _mypkg.othermodule import OtherClass
33

44
class SomeClass:
55
pass

example/mypkg/__init__.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# mypkg/__init__.py
2-
32
import apipkg
4-
apipkg.initpkg(__name__, {
5-
'SomeClass': '_mypkg.somemodule:SomeClass',
6-
'sub': {
7-
'OtherClass': '_mypkg.somemodule:OtherClass',
8-
}
9-
})
3+
4+
apipkg.initpkg(
5+
__name__,
6+
{
7+
"SomeClass": "_mypkg.somemodule:SomeClass",
8+
"sub": {
9+
"OtherClass": "_mypkg.somemodule:OtherClass",
10+
},
11+
},
12+
)

example/mypkg/othermodule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
class OtherClass:
32
pass

example/mypkg/somemodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
from __mypkg.othermodule import OtherClass # NOQA: F401
12

2-
from __mypkg.othermodule import OtherClass
33

44
class SomeClass:
55
pass

setup.cfg

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,50 @@
1+
[metadata]
2+
name = apipkg
3+
description = apipkg: namespace control and lazy-import mechanism
4+
long_description = file: README.rst
5+
long_description_content_type = text/x-rst
6+
url = https://github.com/pytest-dev/apipkg
7+
author = holger krekel
8+
maintainer = Ronny Pfannschmidt
9+
maintainer_email = [email protected]
10+
license = MIT
11+
license_file = LICENSE
12+
platforms =
13+
unix
14+
linux
15+
osx
16+
cygwin
17+
win32
18+
classifiers =
19+
Development Status :: 4 - Beta
20+
Intended Audience :: Developers
21+
License :: OSI Approved :: MIT License
22+
Operating System :: MacOS :: MacOS X
23+
Operating System :: Microsoft :: Windows
24+
Operating System :: POSIX
25+
Programming Language :: Python
26+
Programming Language :: Python :: 2
27+
Programming Language :: Python :: 2.7
28+
Programming Language :: Python :: 3
29+
Programming Language :: Python :: 3.4
30+
Programming Language :: Python :: 3.5
31+
Programming Language :: Python :: 3.6
32+
Programming Language :: Python :: 3.7
33+
Programming Language :: Python :: 3.8
34+
Programming Language :: Python :: 3.9
35+
Programming Language :: Python :: Implementation :: CPython
36+
Topic :: Software Development :: Libraries
37+
38+
[options]
39+
packages = find:
40+
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
41+
package_dir = =src
42+
setup_requires =
43+
setuptools>=30.3.0
44+
setuptools_scm
45+
46+
[options.packages.find]
47+
where = src
48+
149
[wheel]
2-
universal=true
50+
universal = true

0 commit comments

Comments
 (0)