Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Sep 7, 2020
1 parent 0b1aeaa commit a03c286
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 32 deletions.
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.5.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
13 changes: 7 additions & 6 deletions ablog/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,13 @@ def ablog_post(filename, title=None, **kwargs):
print("Blog post created: %s" % filename)


@arg("--github-url",
dest = "github_url",
type = str,
default = "git@github.com",
help = "Custom GitHub URL. Useful when multiple accounts are configured "
"on the same machine. Default is: git@github.com"
@arg(
"--github-url",
dest="github_url",
type=str,
default="git@github.com",
help="Custom GitHub URL. Useful when multiple accounts are configured "
"on the same machine. Default is: git@github.com",
)
@arg(
"--github-token",
Expand Down
1 change: 0 additions & 1 deletion ablog/locale/de/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ msgstr "Nächste"
#: ablog/templates/recentposts.html:2
msgid "Recent Posts"
msgstr "Neue Einträge"

1 change: 0 additions & 1 deletion ablog/locale/es/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,3 @@ msgstr "Siguiente"
#: ablog/templates/recentposts.html:2
msgid "Recent Posts"
msgstr "Entradas recientes"

1 change: 0 additions & 1 deletion ablog/locale/et/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ msgstr "Järgmine"
#: ablog/templates/recentposts.html:2
msgid "Recent Posts"
msgstr "Viimased postitused"

1 change: 0 additions & 1 deletion ablog/locale/fr/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ msgstr "Suivant"
#: ablog/templates/recentposts.html:2
msgid "Recent Posts"
msgstr "Billets récents"

1 change: 0 additions & 1 deletion ablog/locale/tr/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ msgstr "Sonraki"
#: ablog/templates/recentposts.html:2
msgid "Recent Posts"
msgstr "Yeni Yazılar"

1 change: 0 additions & 1 deletion ablog/locale/zh_CN/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ msgstr "下一篇"
#: ablog/templates/recentposts.html:2
msgid "Recent Posts"
msgstr "最近文章"

2 changes: 0 additions & 2 deletions ablog/templates/postcard.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ <h2>
{% include "postcard2.html" %}
</ul>
{% endif %}


2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
9 changes: 4 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from pkg_resources import get_distribution
from sphinx import addnodes

import ablog

ablog_builder = "dirhtml"
ablog_website = "_website"
Expand All @@ -26,17 +25,17 @@
# language = 'tr'
# PROJECT

versionmod = get_distribution('ablog')
versionmod = get_distribution("ablog")

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
# The short X.Y version.
version = '.'.join(versionmod.version.split('.')[:3])
version = ".".join(versionmod.version.split(".")[:3])
# The full version, including alpha/beta/rc tags.
release = versionmod.version.split('+')[0]
release = versionmod.version.split("+")[0]
# Is this version a development release
is_development = '.dev' in release
is_development = ".dev" in release

project = "ABlog"
copyright = "2014-2019, ABlog Team"
Expand Down
1 change: 0 additions & 1 deletion docs/manual/forever-draft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ to be discussed as well, but you don't want a draft to be discussed before
it is published. By adding :rst:dir:`post` directive without published date
and keeping configuration variable :confval:`disqus_drafts` as ``False``,
you can achieve that.

2 changes: 1 addition & 1 deletion docs/manual/post-excerpts-and-images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Let's first include a local and a non-local image in this post.


To link the second one of these, we add ``:image: 2`` option in :rst:dir:`post`
directive.
directive.
2 changes: 1 addition & 1 deletion docs/manual/watch-yourself-blogging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ or add a new one. This won't refresh your browser page though. Unless you
want to hit refresh once in a while, you can easily find an auto refresher
extension for you browser.

.. _Watchdog: https://github.com/gorakhargosh/watchdog
.. _Watchdog: https://github.com/gorakhargosh/watchdog
2 changes: 1 addition & 1 deletion docs/release/ablog-v0.1-released.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ most other posts in this blogumentation.

The idea is to enable making any page in a Sphinx_ project a post so that
users of a software package can subscribe to feeds and follow new releases
as well as code examples added to the documentation.
as well as code examples added to the documentation.
2 changes: 1 addition & 1 deletion docs/release/ablog-v0.5-released.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ABlog v0.5.1 released
:category: Release
:location: SF

Added ``:excerpts:`` option to :rst:dir:`postlist` directive.
Added ``:excerpts:`` option to :rst:dir:`postlist` directive.
2 changes: 1 addition & 1 deletion docs/release/ablog-v0.9-released.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ ABlog v0.9.3 released
:location: World

Added example on how to use writing blog posts in Jupyter notebooks.
Several fixes provived by `anzawatta`, sorry I was late to release these!
Several fixes provived by `anzawatta`, sorry I was late to release these!
16 changes: 10 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
# Concatenate all the values together for 'all'
extras["all"] = list(chain.from_iterable(ex_extras.values()))

setup(extras_require=extras, use_scm_version=True, message_extractors={
'ablog': [
('**.py', 'python', None),
('templates/**.html', 'jinja2', None),
],
})
setup(
extras_require=extras,
use_scm_version=True,
message_extractors={
"ablog": [
("**.py", "python", None),
("templates/**.html", "jinja2", None),
],
},
)

0 comments on commit a03c286

Please sign in to comment.