Skip to content

Commit fa7c0a4

Browse files
committed
Fix pre-commit and apply linters changes
1 parent 1b0aa1e commit fa7c0a4

15 files changed

+136
-136
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
2626
- run: firefox --version
2727
- run: geckodriver --version
28-
28+
2929
- name: Run tests, excluding remote tests
3030
run: |
3131
xvfb-run -- pytest --junitxml=test-results/junit.xml --ignore=tests/test_plugin_remote.py
@@ -44,7 +44,7 @@ jobs:
4444
timeout 60 bash -c 'while ! wget -O /dev/null -T 1 http://localhost:4444/readyz; do echo waiting for selenium server; sleep 1; done' || (cat selenium-server.log && exit 2)
4545
echo "Selenium server is ready, running tests"
4646
pytest --junitxml=test-results/junit.xml tests/test_plugin_remote.py
47-
47+
4848
- name: Publish Test Report
4949
uses: mikepenz/action-junit-report@v3
5050
if: always() # always run even if the previous step fails

.pre-commit-config.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
repos:
2-
- repo: local
3-
hooks:
4-
- id: no_debug
5-
name: Make sure code does not contain commands likely to run interactive debugger
6-
types: [python]
7-
args: [--multiline]
8-
entry: 'breakpoint\(\)|set_trace'
9-
language: pygrep
10-
112
- repo: https://github.com/myint/autoflake
123
rev: 'v1.4'
134
hooks:
@@ -34,7 +25,8 @@ repos:
3425
- repo: https://github.com/psf/black
3526
rev: '22.3.0'
3627
hooks:
37-
- id: black
28+
- id: black
29+
args: ["--skip-string-normalization"]
3830

3931
- repo: https://github.com/pre-commit/pre-commit-hooks
4032
rev: 'v4.1.0'
@@ -44,8 +36,9 @@ repos:
4436
- id: end-of-file-fixer
4537
- id: trailing-whitespace
4638
- id: mixed-line-ending
39+
- id: debug-statements
4740

48-
- repo: https://gitlab.com/pycqa/flake8
41+
- repo: https://github.com/pycqa/flake8
4942
rev: '3.9.2'
5043
hooks:
5144
- id: flake8
@@ -54,4 +47,4 @@ repos:
5447
rev: v2.31.0
5548
hooks:
5649
- id: pyupgrade
57-
args: ["--py37-plus"]
50+
args: ["--py36-plus"]

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ Fixtures
133133
* splinter_driver_kwargs
134134
Webdriver keyword arguments, a dictionary which is passed to selenium
135135
webdriver's constructor (after applying firefox preferences)
136-
136+
137137
.. code-block:: python
138138
139139
import pytest
140140
from pathlib import Path
141-
141+
142142
@pytest.fixture
143143
def splinter_driver_kwargs():
144144
"""

docs/conf.py

Lines changed: 61 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Sphinx config."""
2-
# -*- coding: utf-8 -*-
32
#
43
# pytest-splinter documentation build configuration file, created by
54
# sphinx-quickstart on Sun Apr 7 21:07:56 2013.
@@ -16,8 +15,8 @@
1615
# add these directories to sys.path here. If the directory is relative to the
1716
# documentation root, use os.path.abspath to make it absolute, like shown here.
1817

19-
import sys
2018
import os
19+
import sys
2120

2221
sys.path.insert(0, os.path.abspath('..'))
2322

@@ -26,7 +25,7 @@
2625
# -- General configuration -----------------------------------------------------
2726

2827
# If your documentation needs a minimal Sphinx version, state it here.
29-
#needs_sphinx = '1.0'
28+
# needs_sphinx = '1.0'
3029

3130
# Add any Sphinx extension module names here, as strings. They can be extensions
3231
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
@@ -39,15 +38,15 @@
3938
source_suffix = '.rst'
4039

4140
# The encoding of source files.
42-
#source_encoding = 'utf-8-sig'
41+
# source_encoding = 'utf-8-sig'
4342

4443
# The master toctree document.
4544
master_doc = 'index'
4645

4746
# General information about the project.
48-
project = u'pytest-splinter'
47+
project = 'pytest-splinter'
4948
AUTHOR = 'Anatoly Bubenkov, Paylogic International and others'
50-
copyright = u'2014, ' + AUTHOR
49+
copyright = '2014, ' + AUTHOR
5150

5251
# The version info for the project you're documenting, acts as replacement for
5352
# |version| and |release|, also used in various other places throughout the
@@ -60,37 +59,37 @@
6059

6160
# The language for content autogenerated by Sphinx. Refer to documentation
6261
# for a list of supported languages.
63-
#language = None
62+
# language = None
6463

6564
# There are two options for replacing |today|: either, you set today to some
6665
# non-false value, then it is used:
67-
#today = ''
66+
# today = ''
6867
# Else, today_fmt is used as the format for a strftime call.
69-
#today_fmt = '%B %d, %Y'
68+
# today_fmt = '%B %d, %Y'
7069

7170
# List of patterns, relative to source directory, that match files and
7271
# directories to ignore when looking for source files.
7372
exclude_patterns = ['_build']
7473

7574
# The reST default role (used for this markup: `text`) to use for all documents.
76-
#default_role = None
75+
# default_role = None
7776

7877
# If true, '()' will be appended to :func: etc. cross-reference text.
79-
#add_function_parentheses = True
78+
# add_function_parentheses = True
8079

8180
# If true, the current module name will be prepended to all description
8281
# unit titles (such as .. function::).
83-
#add_module_names = True
82+
# add_module_names = True
8483

8584
# If true, sectionauthor and moduleauthor directives will be shown in the
8685
# output. They are ignored by default.
87-
#show_authors = False
86+
# show_authors = False
8887

8988
# The name of the Pygments (syntax highlighting) style to use.
9089
pygments_style = 'sphinx'
9190

9291
# A list of ignored prefixes for module index sorting.
93-
#modindex_common_prefix = []
92+
# modindex_common_prefix = []
9493

9594

9695
# -- Options for HTML output ---------------------------------------------------
@@ -102,26 +101,26 @@
102101
# Theme options are theme-specific and customize the look and feel of a theme
103102
# further. For a list of options available for each theme, see the
104103
# documentation.
105-
#html_theme_options = {}
104+
# html_theme_options = {}
106105

107106
# Add any paths that contain custom themes here, relative to this directory.
108-
#html_theme_path = []
107+
# html_theme_path = []
109108

110109
# The name for this set of Sphinx documents. If None, it defaults to
111110
# "<project> v<release> documentation".
112-
#html_title = None
111+
# html_title = None
113112

114113
# A shorter title for the navigation bar. Default is the same as html_title.
115-
#html_short_title = None
114+
# html_short_title = None
116115

117116
# The name of an image file (relative to this directory) to place at the top
118117
# of the sidebar.
119-
#html_logo = None
118+
# html_logo = None
120119

121120
# The name of an image file (within the static path) to use as favicon of the
122121
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
123122
# pixels large.
124-
#html_favicon = None
123+
# html_favicon = None
125124

126125
# Add any paths that contain custom static files (such as style sheets) here,
127126
# relative to this directory. They are copied after the builtin static files,
@@ -130,44 +129,44 @@
130129

131130
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
132131
# using the given strftime format.
133-
#html_last_updated_fmt = '%b %d, %Y'
132+
# html_last_updated_fmt = '%b %d, %Y'
134133

135134
# If true, SmartyPants will be used to convert quotes and dashes to
136135
# typographically correct entities.
137-
#html_use_smartypants = True
136+
# html_use_smartypants = True
138137

139138
# Custom sidebar templates, maps document names to template names.
140-
#html_sidebars = {}
139+
# html_sidebars = {}
141140

142141
# Additional templates that should be rendered to pages, maps page names to
143142
# template names.
144-
#html_additional_pages = {}
143+
# html_additional_pages = {}
145144

146145
# If false, no module index is generated.
147-
#html_domain_indices = True
146+
# html_domain_indices = True
148147

149148
# If false, no index is generated.
150-
#html_use_index = True
149+
# html_use_index = True
151150

152151
# If true, the index is split into individual pages for each letter.
153-
#html_split_index = False
152+
# html_split_index = False
154153

155154
# If true, links to the reST sources are added to the pages.
156-
#html_show_sourcelink = True
155+
# html_show_sourcelink = True
157156

158157
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
159-
#html_show_sphinx = True
158+
# html_show_sphinx = True
160159

161160
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
162-
#html_show_copyright = True
161+
# html_show_copyright = True
163162

164163
# If true, an OpenSearch description file will be output, and all pages will
165164
# contain a <link> tag referring to it. The value of this option must be the
166165
# base URL from which the finished HTML is served.
167-
#html_use_opensearch = ''
166+
# html_use_opensearch = ''
168167

169168
# This is the file name suffix for HTML files (e.g. ".xhtml").
170-
#html_file_suffix = None
169+
# html_file_suffix = None
171170

172171
# Output file base name for HTML help builder.
173172
htmlhelp_basename = 'pytest-splinter-doc'
@@ -177,53 +176,54 @@
177176

178177
latex_elements = {
179178
# The paper size ('letterpaper' or 'a4paper').
180-
#'papersize': 'letterpaper',
181-
179+
# 'papersize': 'letterpaper',
182180
# The font size ('10pt', '11pt' or '12pt').
183-
#'pointsize': '10pt',
184-
181+
# 'pointsize': '10pt',
185182
# Additional stuff for the LaTeX preamble.
186-
#'preamble': '',
183+
# 'preamble': '',
187184
}
188185

189186
# Grouping the document tree into LaTeX files. List of tuples
190187
# (source start file, target name, title, author, documentclass [howto/manual]).
191188
latex_documents = [
192-
('index', 'pytest-splinter.tex', u'pytest-splinter Documentation', AUTHOR, 'manual'),
189+
(
190+
'index',
191+
'pytest-splinter.tex',
192+
'pytest-splinter Documentation',
193+
AUTHOR,
194+
'manual',
195+
),
193196
]
194197

195198
# The name of an image file (relative to this directory) to place at the top of
196199
# the title page.
197-
#latex_logo = None
200+
# latex_logo = None
198201

199202
# For "manual" documents, if this is true, then toplevel headings are parts,
200203
# not chapters.
201-
#latex_use_parts = False
204+
# latex_use_parts = False
202205

203206
# If true, show page references after internal links.
204-
#latex_show_pagerefs = False
207+
# latex_show_pagerefs = False
205208

206209
# If true, show URL addresses after external links.
207-
#latex_show_urls = False
210+
# latex_show_urls = False
208211

209212
# Documents to append as an appendix to all manuals.
210-
#latex_appendices = []
213+
# latex_appendices = []
211214

212215
# If false, no module index is generated.
213-
#latex_domain_indices = True
216+
# latex_domain_indices = True
214217

215218

216219
# -- Options for manual page output --------------------------------------------
217220

218221
# One entry per manual page. List of tuples
219222
# (source start file, name, description, authors, manual section).
220-
man_pages = [
221-
('index', 'pytest-splinter', u'pytest-splinter Documentation',
222-
[AUTHOR], 1)
223-
]
223+
man_pages = [('index', 'pytest-splinter', 'pytest-splinter Documentation', [AUTHOR], 1)]
224224

225225
# If true, show URL addresses after external links.
226-
#man_show_urls = False
226+
# man_show_urls = False
227227

228228

229229
# -- Options for Texinfo output ------------------------------------------------
@@ -232,16 +232,22 @@
232232
# (source start file, target name, title, author,
233233
# dir menu entry, description, category)
234234
texinfo_documents = [
235-
('index', 'pytest-splinter', u'pytest-splinter Documentation',
236-
AUTHOR, 'pytest-splinter', 'splinter pytest testing framework integration.',
237-
'Miscellaneous'),
235+
(
236+
'index',
237+
'pytest-splinter',
238+
'pytest-splinter Documentation',
239+
AUTHOR,
240+
'pytest-splinter',
241+
'splinter pytest testing framework integration.',
242+
'Miscellaneous',
243+
),
238244
]
239245

240246
# Documents to append as an appendix to all manuals.
241-
#texinfo_appendices = []
247+
# texinfo_appendices = []
242248

243249
# If false, no module index is generated.
244-
#texinfo_domain_indices = True
250+
# texinfo_domain_indices = True
245251

246252
# How to display URL addresses: 'footnote', 'no', or 'inline'.
247-
#texinfo_show_urls = 'footnote'
253+
# texinfo_show_urls = 'footnote'

0 commit comments

Comments
 (0)