Skip to content

Commit 2b3d963

Browse files
authored
♻ Refactoring (#12)
1 parent caeb0c8 commit 2b3d963

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2003
-1070
lines changed

.circleci/config.yml

-116
This file was deleted.

.codeclimate.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: "2"
2+
checks:
3+
argument-count:
4+
config:
5+
threshold: 4
6+
complex-logic:
7+
config:
8+
threshold: 4
9+
file-lines:
10+
config:
11+
threshold: 250
12+
method-complexity:
13+
config:
14+
threshold: 5
15+
method-count:
16+
config:
17+
threshold: 20
18+
method-lines:
19+
config:
20+
threshold: 25
21+
nested-control-flow:
22+
config:
23+
threshold: 4
24+
return-statements:
25+
config:
26+
threshold: 4
27+
similar-code:
28+
config:
29+
threshold: # language-specific defaults. an override will affect all languages.
30+
identical-code:
31+
config:
32+
threshold: # language-specific defaults. an override will affect all languages.

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/ISSUE_TEMPLATE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### Description
2+
3+
<!--
4+
A detailed description of what is being reported. Please include steps to reproduce the problem.
5+
6+
Things to consider sharing:
7+
- What version of the package is being used (pip show code-snippet)?
8+
- What is the host platform and version (e.g. macOS 10.15.2, Windows 10, Ubuntu 18.04 LTS)?
9+
-->
10+
11+
12+
13+
### Issue request type
14+
15+
<!--
16+
Please add only one `x` to one of the following types. Do not fill multiple types (split the issue otherwise).
17+
18+
19+
For questions please use https://forums.mbed.com/
20+
-->
21+
22+
- [ ] Enhancement
23+
- [ ] Bug

.github/PULL_REQUEST_TEMPLATE.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Description
2+
3+
<!--
4+
Please add any detail or context that would be useful to a reviewer.
5+
-->
6+
7+
8+
9+
### Test Coverage
10+
11+
<!--
12+
Please put an `x` in the correct box e.g. `[x]` to indicate the testing coverage of this change.
13+
-->
14+
15+
- [ ] This change is covered by existing or additional automated tests.
16+
- [ ] Manual testing has been performed (and evidence provided) as automated testing was not feasible.
17+
- [ ] Additional tests are not required for this change (e.g. documentation update).

.gitignore

+22-102
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,30 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
1+
# Don't lock the versions of this library or installation gridlock will ensue
2+
Pipfile.lock
53

6-
# C extensions
7-
*.so
4+
# PyCharm
5+
.idea/
86

9-
# Distribution / packaging
10-
.Python
11-
env/
12-
build/
13-
develop-eggs/
14-
dist/
15-
downloads/
16-
eggs/
17-
.eggs/
18-
lib/
19-
lib64/
20-
parts/
21-
sdist/
22-
var/
23-
wheels/
24-
*.egg-info/
25-
.installed.cfg
26-
*.egg
7+
# macOS
8+
.DS_Store
279

28-
# PyInstaller
29-
# Usually these files are written by a python script from a template
30-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31-
*.manifest
32-
*.spec
33-
34-
# Installer logs
35-
pip-log.txt
36-
pip-delete-this-directory.txt
10+
# Python
11+
*.pyc
12+
__pycache__/
13+
*.egg-info/
3714

38-
# Unit test / coverage reports
39-
htmlcov/
40-
.tox/
15+
# Coverage.py
4116
.coverage
42-
.coverage.*
43-
.cache
44-
nosetests.xml
45-
coverage.xml
46-
*.cover
47-
.hypothesis/
48-
49-
# Translations
50-
*.mo
51-
*.pot
52-
53-
# Django stuff:
54-
*.log
55-
local_settings.py
56-
57-
# Flask stuff:
58-
instance/
59-
.webassets-cache
60-
61-
# Scrapy stuff:
62-
.scrapy
63-
64-
# Sphinx documentation
65-
docs/_build/
66-
67-
# PyBuilder
68-
target/
69-
70-
# Jupyter Notebook
71-
.ipynb_checkpoints
72-
73-
# pyenv
74-
.python-version
75-
76-
# celery beat schedule file
77-
celerybeat-schedule
78-
79-
# SageMath parsed files
80-
*.sage.py
81-
82-
# dotenv
83-
.env
84-
85-
# virtualenv
86-
.venv
87-
venv/
88-
ENV/
89-
90-
# Spyder project settings
91-
.spyderproject
92-
.spyproject
93-
94-
# Rope project settings
95-
.ropeproject
96-
97-
# mkdocs documentation
98-
/site
99-
100-
# mypy
101-
.mypy_cache/
17+
coverage/
18+
junit/
19+
htmlcov/
10220

103-
# pytest
104-
*.pytest*
21+
# Package
22+
build/
23+
dist/
24+
release-dist/
10525

106-
# editors
107-
*.idea
26+
# Temporary file used by CI
27+
dev-requirements.txt
10828

109-
# test directory
110-
tmp_test_dir
29+
# Local docs output
30+
local_docs/

.pre-commit-config.yaml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
- repo: local
2+
hooks:
3+
- id: assertnews
4+
name: news file
5+
entry: assert-news -l
6+
language: python
7+
types: [file]
8+
require_serial: true
9+
verbose: true
10+
always_run: true
11+
pass_filenames: false
12+
13+
- id: licensing
14+
name: licensing
15+
entry: license-files
16+
language: python
17+
types: [file]
18+
require_serial: true
19+
always_run: true
20+
verbose: true
21+
pass_filenames: false
22+
23+
- id: black
24+
name: black
25+
entry: black
26+
language: python
27+
types: [python]
28+
require_serial: true
29+
30+
- id: flake8
31+
name: flake8
32+
entry: flake8
33+
language: python
34+
types: [python]
35+
require_serial: true
36+
37+
- id: mypy
38+
name: mypy
39+
entry: mypy -p snippet
40+
language: python
41+
types: [python]
42+
require_serial: true
43+
pass_filenames: false
44+
45+
- id: pytest
46+
name: pytest
47+
entry: pytest -vvv
48+
language: python
49+
types: [python]
50+
pass_filenames: false
51+
always_run: true
52+

CHANGELOG.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Changelog
2-
> This file is autogenerated.
3-
> Only edit this file directly to correct typos.
4-
> See [CONTRIBUTING)[./CONTRIBUTING.md] for instructions on adding new entries.
5-
6-
This news file contains a log of notable changes to `snippet`. Please see [code-snippet](https://pypi.org/project/code-snippet/#history>) for
7-
a list of versions that have been released on PyPI.
2+
<!--
3+
This file is autogenerated.
4+
Only edit this file directly to correct typos.
5+
See CONTRIBUTING.md for instructions on how new entries get added.
6+
-->
7+
8+
This document contains a history of significant changes which have been released for `code-snippet`. Please note that
9+
beta releases are not included in this history. For a full list of all releases, please see the
10+
[PyPI Release History](https://pypi.org/project/code-snippet/#history).
811

912
[//]: # (begin_release_notes)
1013

0 commit comments

Comments
 (0)