-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt pre-commit for linting and formatting (#1188)
* Add pre-commit-config For formatting and linting. * Run `pre-commit run -a` * Update the CI config to use pre-commit instead of tox * Fix test for django client * Fix handling of bytes / str in some places * Open file in text mode instead of binary + decode
- Loading branch information
Showing
83 changed files
with
966 additions
and
853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v3.10.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
args: | ||
- "--py38-plus" | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.10.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- "--py38-plus" | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.0.1 | ||
hooks: | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.282 | ||
hooks: | ||
- id: ruff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% extends "!genindex.html" %} | ||
|
||
{% block bodyclass %}{% endblock %} | ||
{% block sidebarwrapper %}{% endblock %} | ||
{% block sidebarwrapper %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{% extends "!modindex.html" %} | ||
{% block bodyclass %}{% endblock %} | ||
{% block sidebarwrapper %}{% endblock %} | ||
{% block sidebarwrapper %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{% extends "!search.html" %} | ||
{% block bodyclass %}{% endblock %} | ||
{% block sidebarwrapper %}{% endblock %} | ||
{% block sidebarwrapper %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,3 @@ Welcome to the Splinter API documentation! Check what's inside: | |
element-list | ||
request-handling | ||
exceptions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,3 @@ Request handling | |
|
||
.. autoclass:: splinter.request_handler.status_code.StatusCode | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
exclude = ["docs"] | ||
line-length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# Copyright 2016 splinter authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
from splinter.browser import Browser | ||
from splinter.config import Config | ||
from splinter.version import __version_info__, __version__ # NOQA | ||
from splinter.version import __version__ # noqa: F401 | ||
from splinter.version import __version_info__ # noqa: F401 | ||
|
||
|
||
__all__ = [ | ||
'Browser', | ||
'Config', | ||
"Browser", | ||
"Config", | ||
] |
Oops, something went wrong.