Skip to content

Commit

Permalink
Pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jul 17, 2023
1 parent e1d00a3 commit 2677b59
Show file tree
Hide file tree
Showing 15 changed files with 191 additions and 63 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
extend-ignore = D100,D104,E203,E501,SIM115
6 changes: 3 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"

- uses: actions/upload-artifact@v1
with:
name: documentation-html
Expand All @@ -26,4 +26,4 @@ jobs:
aws_secret_access_key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }}
source_dir: docs/_build/html/
destination_dir: first-github-scraper
destination_dir: first-github-scraper
56 changes: 56 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-json
- id: mixed-line-ending
- id: check-ast
- id: check-merge-conflict

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: 1.15.0
hooks:
- id: blacken-docs
additional_dependencies: [black]

- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-docstrings
- flake8-simplify
- pep8-naming

- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy
additional_dependencies:
- types-requests
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bs4 = "*"
sphinx = "*"
sphinx-autobuild = "*"
myst-parser = "*"
pre-commit = "*"

[dev-packages]

Expand Down
93 changes: 82 additions & 11 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ to the restructured text files in the ``docs`` directory.
$ make docs
```

Open ``http://localhost:8000`` in your browser and start making changes.
Open ``http://localhost:8000`` in your browser and start making changes.
2 changes: 1 addition & 1 deletion docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,4 @@ table.align-default {
pre, tt, code {
background: none;
font-family: 'IBM Plex Mono', 'Droid Sans Mono', monospace;
}
}
2 changes: 1 addition & 1 deletion docs/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ del test.py
**This must be done with caution**. Files you delete from the command line do not go into the recycle bin. They are gone. **Forever**.
```

And that's it! You've learned all the basic command-line tricks necessary to move on.
And that's it! You've learned all the basic command-line tricks necessary to move on.
27 changes: 12 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
from datetime import datetime


extensions = [
"myst_parser"
]
extensions = ["myst_parser"]
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"

project = 'First Web Scraper'
project = "First Web Scraper"
year = datetime.now().year
copyright = f'{year} Chase Davis, Jackie Kazil, Ken Schwencke, Sisi Wei, Ben Welsh and Matt Wynn'
copyright = f"{year} Chase Davis, Jackie Kazil, Ken Schwencke, Sisi Wei, Ben Welsh and Matt Wynn"

exclude_patterns = ["_build"]

html_theme = "alabaster"
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'searchbox.html',
'donate.html',
"**": [
"about.html",
"navigation.html",
"relations.html",
"searchbox.html",
"donate.html",
]
}
html_theme_options = {
Expand All @@ -30,9 +27,9 @@
"show_relbar_bottom": True,
}

html_static_path = ['_static']
html_static_path = ["_static"]
html_css_files = [
'css/custom.css',
"css/custom.css",
]

pygments_style = 'sphinx'
pygments_style = "sphinx"
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ This course is free. The materials assume the reader has little experience with
./python.md
./web-scraping.md
./about.md
```
```
2 changes: 1 addition & 1 deletion docs/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ Verify pip is installed with the following.

```bash
pip -V
```
```
Loading

0 comments on commit 2677b59

Please sign in to comment.