Skip to content

Commit e0f7e18

Browse files
authored
Add pre-commit yaml
1 parent d0560c3 commit e0f7e18

File tree

5 files changed

+121
-10
lines changed

5 files changed

+121
-10
lines changed

.gitignore

Lines changed: 95 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
1-
# Byte-compiled
1+
# Byte-compiled / optimized / DLL files
22
__pycache__/
33
*.py[cod]
44
*$py.class
55

6+
# C extensions
7+
*.so
8+
69
# Distribution / packaging
7-
.idea
810
.Python
911
build/
1012
develop-eggs/
1113
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
1225
*.egg-info/
1326
.installed.cfg
1427
*.egg
1528
MANIFEST
16-
.eggs
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
1735

1836
# Installer logs
1937
pip-log.txt
@@ -26,14 +44,87 @@ htmlcov/
2644
.coverage
2745
.coverage.*
2846
.cache
47+
nosetests.xml
2948
coverage.xml
3049
*.cover
50+
*.py,cover
51+
.hypothesis/
3152
.pytest_cache/
53+
.idea/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
target/
3277

3378
# Jupyter Notebook
3479
.ipynb_checkpoints
3580

81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
.python-version
87+
88+
# pipenv
89+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
91+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
92+
# install all needed dependencies.
93+
#Pipfile.lock
94+
95+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
96+
__pypackages__/
97+
98+
# Celery stuff
99+
celerybeat-schedule
100+
celerybeat.pid
101+
102+
# SageMath parsed files
103+
*.sage.py
104+
36105
# Environments
37106
.env
38107
.venv
39-
/venv
108+
env/
109+
venv/
110+
ENV/
111+
env.bak/
112+
venv.bak/
113+
114+
# Spyder project settings
115+
.spyderproject
116+
.spyproject
117+
118+
# Rope project settings
119+
.ropeproject
120+
121+
# mkdocs documentation
122+
/site
123+
124+
# mypy
125+
.mypy_cache/
126+
.dmypy.json
127+
dmypy.json
128+
129+
# Pyre type checker
130+
.pyre/

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v3.4.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/PyCQA/pydocstyle
12+
rev: 6.0.0
13+
hooks:
14+
- id: pydocstyle
15+
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
16+
rev: v1.0.1
17+
hooks:
18+
- id: rst-linter
19+
- repo: https://gitlab.com/pycqa/flake8.git
20+
rev: 3.9.0
21+
hooks:
22+
- id: flake8

CONTRIBUTING.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,3 @@ Ready to contribute? Here's how to set up `agent-python-pytest` for local develo
8888
$ git push origin name-of-your-bugfix-or-feature
8989

9090
7. Submit a pull request through the GitHub website.
91-

README.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ To run test with Report Portal you must provide '--reportportal' flag:
205205
206206
207207
Test issue info
208-
~~~~~~~~~
208+
~~~~~~~~~~~~~~~
209209

210210
Some pytest marks could be used to specify information about skipped or failed test result.
211211
List of this marks should be specified in pytest ini file (see :code:`rp_issue_marks`).
@@ -226,14 +226,14 @@ Example:
226226
227227
228228
Send attachement (screenshots)
229-
----------------
229+
------------------------------
230230

231231
https://github.com/reportportal/client-Python#send-attachement-screenshots
232232

233233

234234

235235
Troubleshooting
236-
~~~~~~~~~
236+
~~~~~~~~~~~~~~~
237237

238238
In case you have connectivity issues (or similar problems) with Report Portal,
239239
it's possible to ignore exceptions raised by :code:`pytest_reportportal` plugin.
@@ -275,4 +275,3 @@ Copyright Notice
275275
Licensed under the `Apache 2.0`_ license (see the LICENSE file).
276276

277277
.. _Apache 2.0: https://www.apache.org/licenses/LICENSE-2.0
278-

tests/test_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_get_item_parameters(mocked_item, rp_service):
6565
@mock.patch('reportportal_client.service.ReportPortalService.start_test_item')
6666
def test_code_ref_bypass(mocked_item_start, mocked_item, mocked_session,
6767
rp_service):
68-
""" Test that a test code reference constructed and bypassed to a client.
68+
"""Test that a test code reference constructed and bypassed to a client.
6969
7070
:param mocked_item_start: mocked start_test_item method reference
7171
:param mocked_item: a mocked test item

0 commit comments

Comments
 (0)