Skip to content

Commit

Permalink
chore: Add pre-commit config (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Dec 16, 2024
1 parent 6ec2bd5 commit 91167ff
Show file tree
Hide file tree
Showing 13 changed files with 748 additions and 715 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ env.sh
config.json
.autoenv.zsh

*~
*~
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ci:
autofix_prs: false
autoupdate_schedule: monthly
autoupdate_commit_msg: 'chore: pre-commit autoupdate'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-json
- id: check-toml
exclude: |
(?x)^(
copier_template/.*/pyproject.toml
)$
- id: end-of-file-fixer
exclude: (copier_template/.*|docs/.*|samples/.*\.json)
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -617,4 +617,3 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

23 changes: 23 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
line-length = 120
target-version = "py37"

[lint]
select = [
"F", # pyflakes
"E", # pycodestyle (errors)
"W", # pycodestyle (warnings)
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"PIE", # flake8-pie
"YTT", # flake8-2020
"T20", # flake8-print
"SIM", # flake8-simplify
"PERF", # Perflint
"RUF", # Ruff-specific rules
]
53 changes: 27 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@

from setuptools import setup

setup(name='tap-salesforce',
version='1.7.0',
description='Singer.io tap for extracting data from the Salesforce API',
author='Stitch',
url='https://singer.io',
classifiers=['Programming Language :: Python :: 3 :: Only'],
py_modules=['tap_salesforce'],
install_requires=[
'requests==2.32.2',
'singer-python~=5.13',
'xmltodict==0.11.0',
'simple-salesforce<1.0', # v1.0 requires `requests==2.22.0`
# fix version conflicts, see https://gitlab.com/meltano/meltano/issues/193
'idna==3.7',
'cryptography',
'pyOpenSSL',
],
entry_points='''
setup(
name="tap-salesforce",
version="1.7.0",
description="Singer.io tap for extracting data from the Salesforce API",
author="Stitch",
url="https://singer.io",
classifiers=["Programming Language :: Python :: 3 :: Only"],
py_modules=["tap_salesforce"],
install_requires=[
"requests==2.32.2",
"singer-python~=5.13",
"xmltodict==0.11.0",
"simple-salesforce<1.0", # v1.0 requires `requests==2.22.0`
# fix version conflicts, see https://gitlab.com/meltano/meltano/issues/193
"idna==3.7",
"cryptography",
"pyOpenSSL",
],
entry_points="""
[console_scripts]
tap-salesforce=tap_salesforce:main
''',
packages=['tap_salesforce', 'tap_salesforce.salesforce'],
package_data = {
'tap_salesforce/schemas': [
# add schema.json filenames here
]
},
include_package_data=True,
""",
packages=["tap_salesforce", "tap_salesforce.salesforce"],
package_data={
"tap_salesforce/schemas": [
# add schema.json filenames here
]
},
include_package_data=True,
)
Loading

0 comments on commit 91167ff

Please sign in to comment.