Skip to content

Commit 7f68da7

Browse files
[PATCH] Minor updates from review (- WIP PR #76 -)
1 parent 9ab4b75 commit 7f68da7

File tree

4 files changed

+32
-24
lines changed

4 files changed

+32
-24
lines changed

.flake8

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[flake8]
2+
select = C,E,F,W,B,B950
3+
extend-ignore =
4+
W191, # Indentation contains tabs - CEP-8
5+
W391, # Blank line at end of file - CEP-8
6+
E117, # Over-indented - CEP-8
7+
D208, # Docstring is over-indented - CEP-8
8+
D203, # 1 blank line required before class docstring - CEP-7
9+
D212, # Multi-line docstring summary should start at the first line - CEP-7
10+
docstring-convention = google
11+
docstring_style = google
12+
# Ignore long lines as specified in CEP-8
13+
max-line-length = 100
14+
exclude =
15+
# No need to traverse our git directory
16+
.git,
17+
# There's no value in checking cache directories
18+
__pycache__,
19+
# The doc files are mostly autogenerated, ignore them
20+
docs,
21+
# There's no value in checking tox directories
22+
.tox,
23+
# This contains our built documentation
24+
build
25+
max-complexity = 10

.flake8.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test-pytest: cleanup test-reports
103103
$(QUIET)$(ECHO) "$@: Done."
104104

105105
test-style: cleanup
106-
$(QUIET)flake8 --ignore=W191,W391 --max-line-length=100 --verbose --count --config=.flake8.ini
106+
$(QUIET)flake8 --ignore=W191,W391 --max-line-length=100 --verbose --count --config=.flake8
107107
$(QUIET)tests/check_spelling 2>/dev/null || true
108108
$(QUIET)$(ECHO) "$@: Done."
109109

docs/conf.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
# for rst use 'sphinx.ext.autodoc'
3333
extensions = [
3434
'sphinx.ext.napoleon', 'autodoc2', 'sphinx.ext.autosummary',
35-
'sphinx.ext.githubpages',
36-
'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.todo',
37-
'sphinx.ext.linkcode', 'sphinx.ext.viewcode', 'myst_parser'
35+
'sphinx.ext.githubpages', 'myst_parser',
36+
'sphinx.ext.doctest', 'sphinx.ext.todo',
37+
'sphinx.ext.linkcode', 'sphinx.ext.viewcode'
3838
]
3939

4040
# for md auto-docs
@@ -202,10 +202,10 @@
202202
# see https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#syntax-directives
203203

204204
# be more like GFM with style
205-
myst_enable_extensions = set(['tasklist', 'strikethrough', 'fieldlist'])
205+
myst_enable_extensions = ('tasklist', 'strikethrough', 'fieldlist')
206206

207207
# for GFM diagrams and interoperability with other Markdown renderers
208-
myst_fence_as_directive = set(('mermaid', 'suggestion', 'note'))
208+
myst_fence_as_directive = ('mermaid', 'suggestion', 'note')
209209

210210
# Focus only on github markdown
211211
myst_gfm_only = False
@@ -313,9 +313,7 @@
313313

314314
# -- Link resolver -------------------------------------------------------------
315315
def linkcode_resolve(domain, info):
316-
if domain != 'py':
317-
return None
318-
if not info['module']:
316+
if domain != 'py' or not info.get('module'):
319317
return None
320318
filename = info['module'].replace('.', '/')
321319
return "https://github.com/reactive-firewall/python-repo/blob/stable/%s.py" % filename

0 commit comments

Comments
 (0)