Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added linters and pre-commit hooks #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
args: [-l, "120", -C]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [-b, main, -b, master]
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ coverage
python-dateutil >= 2.4.0
setuptools
wheel
pre-commit
black
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[flake8]
max-line-length = 120
ignore = E203, E266, E501, W503
exclude = .git, __pycache__, venv
per-file-ignores = */__init__.py: F401

[isort]
profile = black
multi_line_output = 3
61 changes: 28 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,32 @@
- http://vobject.skyhouseconsulting.com/history.html
"""

from setuptools import setup, find_packages

doclines = (__doc__ or '').splitlines()

setup(name = "vobject",
version = "0.9.7",
author = "Jeffrey Harris",
author_email = "jeffrey@osafoundation.org",
maintainer = "David Arnold",
maintainer_email="davida@pobox.com",
license = "Apache",
zip_safe = True,
url = "http://py-vobject.github.io/vobject/",
download_url = 'https://github.com/py-vobject/vobject/tarball/0.9.7',
bugtrack_url = "https://github.com/py-vobject/vobject/issues",
entry_points = {
'console_scripts': [
'ics_diff = vobject.ics_diff:main',
'change_tz = vobject.change_tz:main'
]
},
include_package_data = True,
install_requires = ['python-dateutil >= 2.4.0', 'six'],
platforms = ["any"],
packages = find_packages(),
description = "A full-featured Python package for parsing and creating "
"iCalendar and vCard files",
long_description = "\n".join(doclines[2:]),
keywords = ['vobject', 'icalendar', 'vcard', 'ics', 'vcs', 'hcalendar'],
test_suite="tests",
classifiers = """
from setuptools import find_packages, setup

doclines = (__doc__ or "").splitlines()

setup(
name="vobject",
version="0.9.7",
author="Jeffrey Harris",
author_email="jeffrey@osafoundation.org",
maintainer="David Arnold",
maintainer_email="davida@pobox.com",
license="Apache",
zip_safe=True,
url="http://py-vobject.github.io/vobject/",
download_url="https://github.com/py-vobject/vobject/tarball/0.9.7",
bugtrack_url="https://github.com/py-vobject/vobject/issues",
entry_points={"console_scripts": ["ics_diff = vobject.ics_diff:main", "change_tz = vobject.change_tz:main"]},
include_package_data=True,
install_requires=["python-dateutil >= 2.4.0", "six"],
platforms=["any"],
packages=find_packages(),
description="A full-featured Python package for parsing and creating " "iCalendar and vCard files",
long_description="\n".join(doclines[2:]),
keywords=["vobject", "icalendar", "vcard", "ics", "vcs", "hcalendar"],
test_suite="tests",
classifiers="""
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
Expand All @@ -63,5 +58,5 @@
Programming Language :: Python
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Topic :: Text Processing""".strip().splitlines()
)
Topic :: Text Processing""".strip().splitlines(),
)
Loading