Skip to content

Commit bfa1ae7

Browse files
digitronikganeshhubale
authored andcommitted
include pre-commit
1 parent cee6ec9 commit bfa1ae7

19 files changed

+160
-169
lines changed

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
name: Trim Trailing Whitespace
7+
language_version: python3
8+
- id: end-of-file-fixer
9+
name: File Ending
10+
language_version: python3
11+
- id: debug-statements
12+
name: Debug Statments
13+
language_version: python3
14+
- id: flake8
15+
name: Flake8
16+
language_version: python3
17+
verbose: true
18+
- id: check-yaml
19+
- repo: https://github.com/asottile/reorder_python_imports
20+
rev: v1.8.0
21+
hooks:
22+
- id: reorder-python-imports
23+
name: Reorder Python Imports
24+
language_version: python3
25+
- repo: https://github.com/psf/black
26+
rev: 19.10b0
27+
hooks:
28+
- id: black
29+
name: Formate with Black
30+
args: [--safe, --quiet, --line-length, "100"]
31+
language_version: python3
32+
require_serial: true
33+
- repo: https://github.com/asottile/pyupgrade
34+
rev: v1.25.2
35+
hooks:
36+
- id: pyupgrade
37+
name: Python Package Checks
38+
language_version: python3

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: python
22
python:
33
- "3.4"
44
- "3.5"
5-
before_install:
5+
before_install:
66
- pip install --upgrade pip
77
matrix:
88
include:

CHANGELOG.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ Added
5656
* Update a Bookmarked URL with specific ID
5757
* URL validation
5858
* Open URL in browser
59-

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Examples
148148
$ readit --openurl urlid
149149
or
150150
$ readit -o url_substring
151-
or
151+
or
152152
$ readit -o tag
153153
154154
9. **Export** bookmarks into the CSV file:
@@ -167,7 +167,7 @@ Examples
167167
or
168168
$ readit --taglist
169169
170-
How to install source code for development
170+
How to install source code for development
171171
**********************************************
172172
* Clone project from github:
173173

@@ -180,7 +180,7 @@ How to install source code for development
180180
.. code-block:: bash
181181
182182
$ cd readit/
183-
183+
184184
$ python3 -m venv env
185185
186186
$ source env/bin/activate
@@ -190,7 +190,7 @@ How to install source code for development
190190
* To install using setup.py file:
191191

192192
.. code-block:: bash
193-
193+
194194
(env) $ python setup.py install
195195
196196
* To make a build of the project:

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/Readit.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Features
2525
* URL validation
2626
* Open URL in the browser
2727
* Export bookmarks into the CSV file
28-
* Show all Tags available in the database
28+
* Show all Tags available in the database
2929
* Bookmark URLs either online or offline
3030

3131
.. |Python| image:: https://img.shields.io/badge/python-3.6-blue.svg
@@ -39,5 +39,3 @@ Features
3939
.. |docs passing| image:: https://readthedocs.org/projects/readit/badge/?version=latest
4040
:target: http://readit.readthedocs.io/en/latest/?badge=latest
4141
:alt: Documentation Status
42-
43-

docs/conf.py

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
#
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
14-
1514
# If extensions (or modules to document with autodoc) are in another directory,
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
#
1918
import os
2019
import sys
21-
sys.path.insert(0, os.path.abspath('../'))
2220

23-
sys.path.append(os.path.abspath('.'))
21+
sys.path.insert(0, os.path.abspath("../"))
22+
23+
sys.path.append(os.path.abspath("."))
2424

2525
# -- General configuration ------------------------------------------------
2626

@@ -31,37 +31,39 @@
3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3333
# ones.
34-
extensions = ['sphinx.ext.autodoc',
35-
'sphinx.ext.viewcode',
36-
'sphinx.ext.autosummary',
37-
'sphinx.ext.napoleon']
34+
extensions = [
35+
"sphinx.ext.autodoc",
36+
"sphinx.ext.viewcode",
37+
"sphinx.ext.autosummary",
38+
"sphinx.ext.napoleon",
39+
]
3840

3941

4042
# Add any paths that contain templates here, relative to this directory.
41-
templates_path = ['_templates']
43+
templates_path = ["_templates"]
4244

4345
# The suffix(es) of source filenames.
4446
# You can specify multiple suffix as a list of string:
4547
#
4648
# source_suffix = ['.rst', '.md']
47-
source_suffix = '.rst'
49+
source_suffix = ".rst"
4850

4951
# The master toctree document.
50-
master_doc = 'index'
52+
master_doc = "index"
5153

5254
# General information about the project.
53-
project = u'readit'
54-
copyright = u'2018, projectreadit organization'
55-
author = u'projectreadit organization'
55+
project = u"readit"
56+
copyright = u"2018, projectreadit organization"
57+
author = u"projectreadit organization"
5658

5759
# The version info for the project you're documenting, acts as replacement for
5860
# |version| and |release|, also used in various other places throughout the
5961
# built documents.
6062
#
6163
# The short X.Y version.
62-
version = u''
64+
version = u""
6365
# The full version, including alpha/beta/rc tags.
64-
release = u'v0.2'
66+
release = u"v0.2"
6567

6668
# The language for content autogenerated by Sphinx. Refer to documentation
6769
# for a list of supported languages.
@@ -73,10 +75,10 @@
7375
# List of patterns, relative to source directory, that match files and
7476
# directories to ignore when looking for source files.
7577
# This patterns also effect to html_static_path and html_extra_path
76-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
78+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7779

7880
# The name of the Pygments (syntax highlighting) style to use.
79-
pygments_style = 'sphinx'
81+
pygments_style = "sphinx"
8082

8183
# If true, `todo` and `todoList` produce output, else they produce nothing.
8284
todo_include_todos = False
@@ -87,7 +89,7 @@
8789
# The theme to use for HTML and HTML Help pages. See the documentation for
8890
# a list of builtin themes.
8991
#
90-
html_theme = 'sphinx_rtd_theme'
92+
html_theme = "sphinx_rtd_theme"
9193

9294
# Theme options are theme-specific and customize the look and feel of a theme
9395
# further. For a list of options available for each theme, see the
@@ -98,30 +100,28 @@
98100
# Add any paths that contain custom static files (such as style sheets) here,
99101
# relative to this directory. They are copied after the builtin static files,
100102
# so a file named "default.css" will overwrite the builtin "default.css".
101-
html_static_path = ['_static']
103+
html_static_path = ["_static"]
102104

103105
# Custom sidebar templates, must be a dictionary that maps document names
104106
# to template names.
105107
#
106108
# This is required for the alabaster theme
107109
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
108110
html_sidebars = {
109-
'**': [
110-
'about.html',
111-
'navigation.html',
112-
'relations.html', # needs 'show_related': True theme option to display
113-
'searchbox.html',
114-
'donate.html',
111+
"**": [
112+
"about.html",
113+
"navigation.html",
114+
"relations.html", # needs 'show_related': True theme option to display
115+
"searchbox.html",
116+
"donate.html",
115117
]
116118
}
117119

118120

119-
120-
121121
# -- Options for HTMLHelp output ------------------------------------------
122122

123123
# Output file base name for HTML help builder.
124-
htmlhelp_basename = 'readitdoc'
124+
htmlhelp_basename = "readitdoc"
125125

126126

127127
# -- Options for LaTeX output ---------------------------------------------
@@ -130,15 +130,12 @@
130130
# The paper size ('letterpaper' or 'a4paper').
131131
#
132132
# 'papersize': 'letterpaper',
133-
134133
# The font size ('10pt', '11pt' or '12pt').
135134
#
136135
# 'pointsize': '10pt',
137-
138136
# Additional stuff for the LaTeX preamble.
139137
#
140138
# 'preamble': '',
141-
142139
# Latex figure (float) alignment
143140
#
144141
# 'figure_align': 'htbp',
@@ -148,19 +145,15 @@
148145
# (source start file, target name, title,
149146
# author, documentclass [howto, manual, or own class]).
150147
latex_documents = [
151-
(master_doc, 'readit.tex', u'readit Documentation',
152-
u'projectreadit organization', 'manual'),
148+
(master_doc, "readit.tex", u"readit Documentation", u"projectreadit organization", "manual"),
153149
]
154150

155151

156152
# -- Options for manual page output ---------------------------------------
157153

158154
# One entry per manual page. List of tuples
159155
# (source start file, name, description, authors, manual section).
160-
man_pages = [
161-
(master_doc, 'readit', u'readit Documentation',
162-
[author], 1)
163-
]
156+
man_pages = [(master_doc, "readit", u"readit Documentation", [author], 1)]
164157

165158

166159
# -- Options for Texinfo output -------------------------------------------
@@ -169,10 +162,13 @@
169162
# (source start file, target name, title, author,
170163
# dir menu entry, description, category)
171164
texinfo_documents = [
172-
(master_doc, 'readit', u'readit Documentation',
173-
author, 'readit', 'One line description of project.',
174-
'Miscellaneous'),
165+
(
166+
master_doc,
167+
"readit",
168+
u"readit Documentation",
169+
author,
170+
"readit",
171+
"One line description of project.",
172+
"Miscellaneous",
173+
),
175174
]
176-
177-
178-

docs/get_involved.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,3 @@ Collaborators
4141
* `Daivshala Vighne <https://github.com/daivshala>`_
4242
* `Ganesh Hubale <https://github.com/ganeshhubale>`_
4343
* `Shital Mule <https://github.com/shitalmule04>`_
44-
45-

docs/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ i.. readit documentation master file, created by
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55

6-
Readit
6+
Readit
77
======
88

99
Command Line Bookmark manager.
@@ -18,7 +18,7 @@ Command Line Bookmark manager.
1818
usage
1919
get_involved
2020
changes
21-
21+
2222

2323

2424
.. toctree::
@@ -36,4 +36,3 @@ Indices and tables
3636
* :ref:`genindex`
3737
* :ref:`modindex`
3838
* :ref:`search`
39-

docs/installation.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@ From a package manager
2121
Release Packages
2222
****************
2323
Packages for Fedora are availabe with the `latest release <https://github.com/projectreadit/readit/releases/tag/v0.2>`_.
24-
25-

0 commit comments

Comments
 (0)