8000 First commit · dry-python/classes@b39d89b · GitHub
[go: up one dir, main page]

Skip to content

Commit b39d89b

Browse files
committed
First commit
0 parents  commit b39d89b

16 files changed

+2135
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Check http://editorconfig.org for more information
2+
# This is the main config file for this project:
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
end_of_line = lf
9+
indent_style = space
10+
insert_final_newline = true
11+
indent_size = 2
12+
13+
[*.py]
14+
indent_size = 4
15+
16+
[*.pyi]
17+
indent_size = 4

.gitignore

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#### joe made this: http://goel.io/joe
2+
#### python ####
3+
# Byte-compiled / optimized / DLL files
4+
.pytest_cache
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
pip-wheel-metadata/
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# Environments
86+
.env
87+
.venv
88+
env/
89+
venv/
90+
ENV/
91+
92+
# Spyder project settings
93+
.spyderproject
94+
.spyproject
95+
96+
# Rope project settings
97+
.ropeproject
98+
99+
# mkdocs documentation
100+
/site
101+
102+
# mypy
103+
.mypy_cache/
104+
#### macos ####
105+
# General
106+
*.DS_Store
107+
.AppleDouble
108+
.LSOverride
109+
110+
# Icon must end with two \r
111+
Icon
112+
113+
114+
# Thumbnails
115+
._*
116+
117+
# Files that might appear in the root of a volume
118+
.DocumentRevisions-V100
119+
.fseventsd
120+
.Spotlight-V100
121+
.TemporaryItems
122+
.Trashes
123+
.VolumeIcon.icns
124+
.com.apple.timemachine.donotpresent
125+
126+
# Directories potentially created on remote AFP share
127+
.AppleDB
128+
.AppleDesktop
129+
Network Trash Folder
130+
Temporary Items
131+
.apdisk
132+
#### windows ####
133+
# Windows thumbnail cache files
134+
Thumbs.db
135+
ehthumbs.db
136+
ehthumbs_vista.db
137+
138+
# Dump file
139+
*.stackdump
140+
141+
# Folder config file
142+
Desktop.ini
143+
144+
# Recycle Bin used on file shares
145+
$RECYCLE.BIN/
146+
147+
# Windows Installer files
148+
*.cab
149+
*.msi
150+
*.msm
151+
*.msp
152+
153+
# Windows shortcuts
154+
*.lnk
155+
#### linux ####
156+
*~
157+
158+
# temporary files which can be created if a process still has a handle open of a deleted file
159+
.fuse_hidden*
160+
161+
# KDE directory preferences
162+
.directory
163+
164+
# Linux trash folder which might appear on any partition or disk
165+
.Trash-*
166+
167+
# .nfs files are created when an open file is removed but is still being accessed
168+
.nfs*
169+
#### jetbrains ####
170+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
171+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
172+
173+
# User-specific stuff:
174+
.idea/
175+
176+
## File-based project format:
177+
*.iws
178+
179+
## Plugin-specific files:
180+
181+
# IntelliJ
182+
/out/
183+
184+
# mpeltonen/sbt-idea plugin
185+
.idea_modules/
186+
187+
# JIRA plugin
188+
atlassian-ide-plugin.xml
189+
190+
# Cursive Clojure plugin
191+
.idea/replstate.xml
192+
193+
# Crashlytics plugin (for Android Studio and IntelliJ)
194+
com_crashlytics_export_strings.xml
195+
crashlytics.properties
196+
crashlytics-build.properties
197+
fabric.properties
198+
199+
### Custom ###
200+
ex.py

.travis.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
language: python
2+
dist: xenial
3+
4+
python:
5+
- 3.6
6+
- 3.7
7+
8+
before_install:
9+
- pip freeze | xargs pip uninstall -y
10+
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
11+
- source "$HOME/.poetry/env"
12+
13+
install: poetry install
14+
15+
script:
16+
- poetry run flake8 .
17+
- poetry run mypy safe_assert
18+
- poetry run pytest
19+
- poetry check
20+
- poetry run pip check
21+
- poetry run safety check --bare --full-report
22+
23+
after_success:
24+
- pip install coveralls
25+
- coveralls
26+
27+
notifications:
28+
email:
29+
on_success: never
30+
on_failure: change

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Version history
2+
3+
We follow Semantic Versions since the `0.1.0` release.
4+
5+
6+
## Version 0.1.0
7+
8+
- Initial release

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Nikita Sobolev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# classes
2+
3+
[![classes logo](https://raw.githubusercontent.com/dry-python/brand/master/logo/classes.png)](https://github.com/dry-python/classes)
4+
5+
-----
6+
7+
[![Build Status](https://travis-ci.org/dry-python/classes.svg?branch=master)](https://travis-ci.org/dry-python/classes)
8+
[![Coverage Status](https://coveralls.io/repos/github/dry-python/classes/badge.svg?branch=master)](https://coveralls.io/github/dry-python/classes?branch=master)
9+
[![Documentation Status](https://readthedocs.org/projects/classes/badge/?version=latest)](https://classes.readthedocs.io/en/latest/?badge=latest)
10+
[![Python Version](https://img.shields.io/pypi/pyversions/classes.svg)](https://pypi.org/project/classes/)
11+
[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)
12+
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
13+
14+
-----
15+
16+
Use smart, ad-hoc, typed polymorphism for your data types.
17+
18+
19+
## Features
20+
21+
- WIP

classes/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
3+
"""
4+
Here we define the public API of our module.
5+
6+
Make sure to mark all imports as ``as`` imports,
7+
so mypy's ``implicit_reexport`` rule will be happy.
8+
"""
9+
10+
from classes.typeclass import typeclass as typeclass

classes/contrib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

classes/contrib/mypy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

0 commit comments

Comments
 (0)
0