Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Commit 6780e88

Browse files
authored
Merge pull request #52 from kjaymiller/pre-commit
Add pre-commit
2 parents 010827b + 8b0a1c1 commit 6780e88

File tree

15 files changed

+63
-24
lines changed

15 files changed

+63
-24
lines changed

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
layout python python
1+
layout python python

.github/ISSUE_TEMPLATE/Add Conference.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ body:
5858
description: The end date of the Call for Papers.
5959
placeholder: "DD MMM YYYY"
6060
validations:
61-
required: false
61+
required: false
6262
- type: textarea
6363
id: conference_description
6464
attributes:

.github/ISSUE_TEMPLATE/episode-post-prep.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ body:
5454
placeholder: "YYYY-MM-DDTHH:MMZ"
5555
validations:
5656
required: true
57-

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ dmypy.json
130130
.direnv
131131
node_modules
132132
.envrc
133-
output/
133+
output/

.pre-commit-config.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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: v4.3.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: requirements-txt-fixer
11+
files: requirements.in
12+
13+
- repo: https://github.com/psf/black
14+
rev: 22.8.0
15+
hooks:
16+
- id: black
17+
name: Format Python
18+
language_version: python3.10
19+
20+
- repo: https://github.com/pycqa/isort
21+
rev: 5.10.1
22+
hooks:
23+
- id: isort
24+
name: Format Python imports
25+
args:
26+
- --profile=black
27+
28+
- repo: https://github.com/jazzband/pip-tools
29+
rev: 6.8.0
30+
hooks:
31+
- id: pip-compile
32+
name: Compile Python requirements
33+
34+
35+
- id: pip-compile
36+
name: Upgrade Python dependencies
37+
stages: [manual]
38+
args:
39+
- --upgrade

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"python.analysis.extraPaths": [
33
"./site/src"
44
]
5-
}
5+
}

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ For answers to common questions about this code of conduct, see the FAQ at
128128
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
129129
[Mozilla CoC]: https://github.com/mozilla/diversity
130130
[FAQ]: https://www.contributor-covenant.org/faq
131-
[translations]: https://www.contributor-covenant.org/translations
131+
[translations]: https://www.contributor-covenant.org/translations

app/__init__.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
from render_engine.site import Site
21
from render_engine.blog import Blog
32
from render_engine.page import Page
3+
from render_engine.site import Site
44

55

66
class Site(Site):
7-
output_path = 'output'
7+
output_path = "output"
88
site_vars: dict = {
99
"SITE_TITLE": "Python Community News",
10-
"SITE_URL": "https://pythoncommunitynews.com"
10+
"SITE_URL": "https://pythoncommunitynews.com",
1111
}
1212

13-
if __name__ == '__main__':
13+
14+
if __name__ == "__main__":
1415
site = Site(static="static")
15-
16+
1617
@site.render_page
1718
class index(Page):
18-
template = 'index.html'
19+
template = "index.html"
1920

2021
@site.render_collection
2122
class archive(Blog):
2223
has_archive = True
23-
output_path = './'
24-
content_path = './app/content'
25-
template = 'new_post.html'
26-
archive_template: str = 'archive.html'
24+
output_path = "./"
25+
content_path = "./app/content"
26+
template = "new_post.html"
27+
archive_template: str = "archive.html"

app/content/2022-08-26.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A phishing attack has targeted maintainers of projects hosted on https://pypi.or
3030

3131
URL: https://spectrum.ieee.org/top-programming-languages-2022
3232

33-
Python's position w/e but I would like to learn more about why it's not as appealing as SQL/Java in job hunt, especially when we have solid ORMs. (The Java thing is just legacy IMHO)
33+
Python's position w/e but I would like to learn more about why it's not as appealing as SQL/Java in job hunt, especially when we have solid ORMs. (The Java thing is just legacy IMHO)
3434

3535
### KiwiPy Talks are Now Available
3636
<small>Submitted by: [kjaymiller](https://api.github.com/users/kjaymiller) on 2022-08-26T15:49:42Z</small>

static/tailwind.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)