Skip to content

Commit 7e0daf1

Browse files
committed
allow latest python 3. added black and flake8
1 parent d1bc409 commit 7e0daf1

File tree

7 files changed

+296
-118
lines changed

7 files changed

+296
-118
lines changed

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
exclude =
3+
.git,
4+
webpack

Pipfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name = "pypi"
33
url = "https://pypi.org/simple"
44
verify_ssl = true
55

6-
[dev-packages]
7-
86
[packages]
7+
black = "==19.10b0"
8+
flake8 = "*"
99
lektor = "*"
1010
# Werkzeug added and pinned to mitigate this issue:
1111
# https://github.com/nixjdm/lektor-atom/issues/23
1212
Werkzeug = "==0.16.1"
1313

1414
[requires]
15-
python_version = "3.7"
15+
python_version = "3"

Pipfile.lock

+250-88
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/checkfile/lektor_checkfile.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55

66
class CheckfilePlugin(Plugin):
7-
name = 'CheckFile'
8-
description = u'Plugin to check if a file is present.'
7+
name = "CheckFile"
8+
description = u"Plugin to check if a file is present."
99

1010
def on_setup_env(self, **extra):
11-
1211
def check_file(filename):
1312
fn = os.path.join(self.env.root_path, filename)
14-
assert os.path.isfile(fn), 'file {} does not exist'.format(fn)
13+
assert os.path.isfile(fn), "file {} does not exist".format(fn)
1514
return ""
16-
self.env.jinja_env.globals.update(
17-
check_file=check_file
18-
)
15+
16+
self.env.jinja_env.globals.update(check_file=check_file)

packages/checkfile/setup.py

+21-19
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@
44

55
from setuptools import setup, find_packages
66

7-
with io.open('README.md', 'rt', encoding="utf8") as f:
7+
with io.open("README.md", "rt", encoding="utf8") as f:
88
readme = f.read()
99

10-
_description_re = re.compile(r'description\s+=\s+(?P<description>.*)')
10+
_description_re = re.compile(r"description\s+=\s+(?P<description>.*)")
1111

12-
with open('lektor_checkfile.py', 'rb') as f:
13-
description = str(ast.literal_eval(_description_re.search(
14-
f.read().decode('utf-8')).group(1)))
12+
with open("lektor_checkfile.py", "rb") as f:
13+
description = str(
14+
ast.literal_eval(
15+
_description_re.search(f.read().decode("utf-8")).group(1)
16+
)
17+
)
1518

1619
setup(
17-
author='mayank',
18-
author_email='mayank.nader11@gmail.com',
20+
author="mayank",
21+
author_email="mayank.nader11@gmail.com",
1922
description=description,
20-
keywords='Lektor plugin',
21-
license='MIT',
23+
keywords="Lektor plugin",
24+
license="MIT",
2225
long_description=readme,
23-
long_description_content_type='text/markdown',
24-
name='lektor-checkfile',
26+
long_description_content_type="text/markdown",
27+
name="lektor-checkfile",
2528
packages=find_packages(),
26-
py_modules=['lektor_checkfile'],
29+
py_modules=["lektor_checkfile"],
2730
# url='[link to your repository]',
28-
version='0.1',
31+
version="0.1",
2932
classifiers=[
30-
'Framework :: Lektor',
31-
'Environment :: Plugins',
33+
"Environment :: Plugins",
34+
"Framework :: Lektor",
35+
"Programming Language :: Python :: 3",
3236
],
3337
entry_points={
34-
'lektor.plugins': [
35-
'checkfile = lektor_checkfile:CheckfilePlugin',
36-
]
37-
}
38+
"lektor.plugins": ["checkfile = lektor_checkfile:CheckfilePlugin",] # noqa: E231, E501
39+
},
3840
)

packages/markdown-table/setup.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
py_modules=["lektor_markdown_table"],
2222
url="https://github.com/sp35/lektor-markdown-table",
2323
version="0.1",
24-
classifiers=["Framework :: Lektor", "Environment :: Plugins", ],
24+
classifiers=[
25+
"Framework :: Lektor",
26+
"Environment :: Plugins",
27+
"Programming Language :: Python :: 3",
28+
],
2529
entry_points={
2630
"lektor.plugins": [
2731
"markdown-table = lektor_markdown_table:MarkdownTablePlugin",

pyproject.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[tool.black]
2+
line-length = 79
3+
exclude = '''
4+
/(
5+
\.git
6+
| webpack
7+
)/
8+
'''

0 commit comments

Comments
 (0)